mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 09:50:12 +00:00
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).
This commit is contained in:
parent
615838083d
commit
32b8b19ba5
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue