Preferences: reset preference pages parameters set without using "PrefWidgets" objects

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
This commit is contained in:
CalligaroV
2024-01-13 11:39:22 +01:00
committed by Chris Hennes
parent bdb82b8f8a
commit adb1fcfed8
15 changed files with 184 additions and 3 deletions

View File

@@ -866,6 +866,11 @@ void DlgPreferencesImp::restorePageDefaults(PreferencesPageItem* item)
auto* page = qobject_cast<PreferencePage*>(item->getWidget());
page->resetSettingsToDefaults();
/**
* Let's save the restart request before the page object is deleted and replaced with
* the newPage object (wich has restartRequired initialized to false)
*/
restartRequired = restartRequired || page->isRestartRequired();
std::string pageName = page->property(PageNameProperty).toString().toStdString();
std::string groupName = page->property(GroupNameProperty).toString().toStdString();