diff --git a/plugin-worldclock/lxqtworldclockconfiguration.cpp b/plugin-worldclock/lxqtworldclockconfiguration.cpp index 384abc260..082da1ee4 100644 --- a/plugin-worldclock/lxqtworldclockconfiguration.cpp +++ b/plugin-worldclock/lxqtworldclockconfiguration.cpp @@ -658,3 +658,12 @@ void LXQtWorldClockConfiguration::moveTimeZoneDown() saveSettings(); } + +void LXQtWorldClockConfiguration::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-worldclock/lxqtworldclockconfiguration.h b/plugin-worldclock/lxqtworldclockconfiguration.h index 9a1c66536..1b92fdb9b 100644 --- a/plugin-worldclock/lxqtworldclockconfiguration.h +++ b/plugin-worldclock/lxqtworldclockconfiguration.h @@ -62,6 +62,8 @@ public slots: */ void loadSettings(); + void dialogButtonsAction(QAbstractButton *btn); + private slots: void timeFormatChanged(int); void dateGroupToggled(bool);