From 32b8b19ba556a5429e9b70e7d2cac9e468faf08a Mon Sep 17 00:00:00 2001 From: Elvis Angelaccio Date: Wed, 13 Jun 2018 23:16:33 +0200 Subject: [PATCH] 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). --- src/settings/viewpropertiesdialog.cpp | 1 + 1 file changed, 1 insertion(+) 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);