Added scroll area to layout settings dialog.
This commit is contained in:
parent
e876a4d611
commit
62ff405cc0
|
@ -30,6 +30,7 @@
|
|||
- [smart-pattern/valentina#43] Background image.
|
||||
- Fix alias for tool Cut Arc.
|
||||
- Fix infinite loop in tool cut spline.
|
||||
- Added scroll area to layout settings dialog.
|
||||
|
||||
# Valentina 0.7.49 July 1, 2021
|
||||
- Fix crash.
|
||||
|
|
|
@ -516,7 +516,7 @@ QString DialogLayoutSettings::MakeGroupsHelp()
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void DialogLayoutSettings::showEvent(QShowEvent *event)
|
||||
{
|
||||
QDialog::showEvent( event );
|
||||
VAbstractLayoutDialog::showEvent( event );
|
||||
if ( event->spontaneous() )
|
||||
{
|
||||
return;
|
||||
|
@ -528,12 +528,28 @@ void DialogLayoutSettings::showEvent(QShowEvent *event)
|
|||
}
|
||||
// do your init stuff here
|
||||
|
||||
setMaximumSize(size());
|
||||
setMinimumSize(size());
|
||||
const QSize sz = VAbstractApplication::VApp()->Settings()->GetLayoutSettingsDialogSize();
|
||||
if (not sz.isEmpty())
|
||||
{
|
||||
resize(sz);
|
||||
}
|
||||
|
||||
isInitialized = true;//first show windows are held
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void DialogLayoutSettings::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
// remember the size for the next time this dialog is opened, but only
|
||||
// if widget was already initialized, which rules out the resize at
|
||||
// dialog creating, which would
|
||||
if (isInitialized)
|
||||
{
|
||||
VAbstractApplication::VApp()->Settings()->SetLayoutSettingsDialogSize(size());
|
||||
}
|
||||
VAbstractLayoutDialog::resizeEvent(event);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void DialogLayoutSettings::ConvertLayoutSize()
|
||||
{
|
||||
|
|
|
@ -120,7 +120,8 @@ public:
|
|||
qreal PageToPixels(qreal value) const;
|
||||
static QString MakeGroupsHelp();
|
||||
protected:
|
||||
virtual void showEvent(QShowEvent *event) override;
|
||||
void showEvent(QShowEvent *event) override;
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
QSizeF GetTemplateSize(const PaperSizeTemplate &tmpl, const Unit &unit) const;
|
||||
|
||||
public slots:
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -121,6 +121,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingToolSeamAllowanceDialogSize, (QL
|
|||
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingIncrementsDialogSize, (QLatin1String("toolIncrementsDialogSize")))
|
||||
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingFormulaWizardDialogSize, (QLatin1String("formulaWizardDialogSize")))
|
||||
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingFinalMeasurementsDialogSize, (QLatin1String("finalMeasurementsDialogSize")))
|
||||
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingLayoutSettingsDialogSize, (QLatin1String("layoutSettingsDialogSize")))
|
||||
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingAutomaticallyCheckUpdates, (QLatin1String("automaticallyCheckUpdates")))
|
||||
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingLatestSkippedVersion, (QLatin1String("lastestSkippedVersion")))
|
||||
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingDateOfLastRemind, (QLatin1String("dateOfLastRemind")))
|
||||
|
@ -822,6 +823,18 @@ void VCommonSettings::SetFinalMeasurementsDialogSize(const QSize &sz)
|
|||
setValue(*settingFinalMeasurementsDialogSize, sz);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
auto VCommonSettings::GetLayoutSettingsDialogSize() const -> QSize
|
||||
{
|
||||
return value(*settingLayoutSettingsDialogSize, QSize(0, 0)).toSize();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VCommonSettings::SetLayoutSettingsDialogSize(const QSize &sz)
|
||||
{
|
||||
setValue(*settingLayoutSettingsDialogSize, sz);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
bool VCommonSettings::IsAutomaticallyCheckUpdates() const
|
||||
{
|
||||
|
|
|
@ -157,6 +157,9 @@ public:
|
|||
QSize GetFinalMeasurementsDialogSize() const;
|
||||
void SetFinalMeasurementsDialogSize(const QSize& sz);
|
||||
|
||||
QSize GetLayoutSettingsDialogSize() const;
|
||||
void SetLayoutSettingsDialogSize(const QSize& sz);
|
||||
|
||||
bool IsAutomaticallyCheckUpdates() const;
|
||||
void SetAutomaticallyCheckUpdates(bool value);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user