From 408982e709fee51b5a0791c01468198219a46eb3 Mon Sep 17 00:00:00 2001 From: 0penBrain <48731257+0penBrain@users.noreply.github.com> Date: Wed, 13 Oct 2021 14:58:05 +0200 Subject: [PATCH] [Gui] UserEditMode : last used mode is remembered between sessions --- src/Gui/CommandStd.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Gui/CommandStd.cpp b/src/Gui/CommandStd.cpp index b593258ce2..acb60bb89a 100644 --- a/src/Gui/CommandStd.cpp +++ b/src/Gui/CommandStd.cpp @@ -868,6 +868,11 @@ Gui::Action * StdCmdUserEditMode::createAction(void) } _pcAction = pcAction; + + int lastMode = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/General")-> + GetInt("UserEditMode", 0); + Gui::Application::Instance->setUserEditMode(lastMode); + languageChange(); return pcAction; } @@ -901,6 +906,8 @@ void StdCmdUserEditMode::updateIcon(int mode) void StdCmdUserEditMode::activated(int iMsg) { + App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/General")-> + SetInt("UserEditMode", iMsg); Gui::Application::Instance->setUserEditMode(iMsg); }