diff --git a/plugin-taskbar/lxqttaskbarconfiguration.cpp b/plugin-taskbar/lxqttaskbarconfiguration.cpp index 25fe551ff..db3645378 100644 --- a/plugin-taskbar/lxqttaskbarconfiguration.cpp +++ b/plugin-taskbar/lxqttaskbarconfiguration.cpp @@ -131,3 +131,12 @@ void LXQtTaskbarConfiguration::saveSettings() settings().setValue(QStringLiteral("wheelEventsAction"),ui->wheelEventsActionCB->itemData(ui->wheelEventsActionCB->currentIndex())); settings().setValue(QStringLiteral("wheelDeltaThreshold"),ui->wheelDeltaThresholdSB->value()); } + +void LXQtTaskbarConfiguration::dialogButtonsAction(QAbstractButton *btn) +{ + LXQtPanelPluginConfigDialog::dialogButtonsAction(btn); + // also, apply the changes if the Reset button is clicked + QDialogButtonBox *box = qobject_cast(btn->parent()); + if (box && box->buttonRole(btn) == QDialogButtonBox::ResetRole) + saveSettings(); +} diff --git a/plugin-taskbar/lxqttaskbarconfiguration.h b/plugin-taskbar/lxqttaskbarconfiguration.h index e559508b7..b42f0a99e 100644 --- a/plugin-taskbar/lxqttaskbarconfiguration.h +++ b/plugin-taskbar/lxqttaskbarconfiguration.h @@ -52,6 +52,8 @@ class LXQtTaskbarConfiguration : public LXQtPanelPluginConfigDialog */ void loadSettings(); + void dialogButtonsAction(QAbstractButton *btn); + private slots: void saveSettings(); };