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 9ceb1e7af1
commit 49e7bba9c7
15 changed files with 184 additions and 3 deletions

View File

@@ -135,6 +135,21 @@ void DlgSettings3DViewImp::loadSettings()
ui->boxMarkerSize->setCurrentIndex(index);
}
void DlgSettings3DViewImp::resetSettingsToDefaults()
{
ParameterGrp::handle hGrp;
hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View");
//reset "AntiAliasing" parameter
hGrp->RemoveInt("AntiAliasing");
//reset "RenderCache" parameter
hGrp->RemoveInt("RenderCache");
//reset "MarkerSize" parameter
hGrp->RemoveInt("MarkerSize");
//finally reset all the parameters associated to Gui::Pref* widgets
PreferencePage::resetSettingsToDefaults();
}
/**
* Sets the strings of the subwidgets using the current language.
*/