Gui: by default restore the last visited page in the preferences dialog
See also: https://forum.freecad.org/viewtopic.php?t=77071
This commit is contained in:
@@ -370,8 +370,19 @@ Action * StdCmdDlgPreferences::createAction()
|
||||
void StdCmdDlgPreferences::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
|
||||
static QString groupName{};
|
||||
static int index{};
|
||||
|
||||
Gui::Dialog::DlgPreferencesImp cDlg(getMainWindow());
|
||||
cDlg.exec();
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences");
|
||||
if (hGrp->GetBool("RestoreGroupPage", true)) {
|
||||
cDlg.activateGroupPage(groupName, index);
|
||||
}
|
||||
|
||||
if (cDlg.exec()) {
|
||||
cDlg.activeGroupPage(groupName, index);
|
||||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
||||
Reference in New Issue
Block a user