diff options
| author | Elvis Angelaccio <[email protected]> | 2018-06-13 23:16:33 +0200 |
|---|---|---|
| committer | Elvis Angelaccio <[email protected]> | 2018-06-13 23:16:33 +0200 |
| commit | 32b8b19ba556a5429e9b70e7d2cac9e468faf08a (patch) | |
| tree | 477433c54a55238424e47e24214940c82d1188cd | |
| parent | 615838083dfe7ff6845069cc18a88d38be56a478 (diff) | |
ViewPropertiesDialog: disable Apply button on startup
We call `markAsDirty(false)` at the end of `loadSettings()` but that's
not enough, because `m_isDirty` is initialized to false (as it should be).
This means `isDirtyChanged` is not emitted and the button is not disabled.
By disabling it explicitly, we make it consistent with the Apply button
in the settings dialog (which is also initially disabled).
| -rw-r--r-- | src/settings/viewpropertiesdialog.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/settings/viewpropertiesdialog.cpp b/src/settings/viewpropertiesdialog.cpp index dbbf5fa68..60c9f21f5 100644 --- a/src/settings/viewpropertiesdialog.cpp +++ b/src/settings/viewpropertiesdialog.cpp @@ -196,6 +196,7 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) : okButton->setDefault(true); auto applyButton = buttonBox->button(QDialogButtonBox::Apply); + applyButton->setEnabled(false); connect(applyButton, &QPushButton::clicked, this, &ViewPropertiesDialog::slotApply); connect(this, &ViewPropertiesDialog::isDirtyChanged, applyButton, [applyButton](bool isDirty) { applyButton->setEnabled(isDirty); |
