From 81bd2cf34a49a4fef6f6cbde03004150fbd9a22b Mon Sep 17 00:00:00 2001 From: Abdullah Tahiri Date: Sat, 23 May 2015 20:47:44 +0200 Subject: [PATCH] Bug fix: Sketcher: "Ask for value after creating distance constraint" setting not working ======================================================================================== How to replicate: 1. Go to Preferences->Display->Sketch and disable that checkbox. 2. Create a distance constraint (radius, distance, ...) It will ask for the value regardless of whether the checkbox is clicked or not. Why? In SketcherSettings.ui the prefpath is "Mod/Sketcher" The code refered to ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher/General"); --- src/Mod/Sketcher/Gui/CommandConstraints.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mod/Sketcher/Gui/CommandConstraints.cpp b/src/Mod/Sketcher/Gui/CommandConstraints.cpp index e8801dbb83..4534260f4a 100644 --- a/src/Mod/Sketcher/Gui/CommandConstraints.cpp +++ b/src/Mod/Sketcher/Gui/CommandConstraints.cpp @@ -175,7 +175,7 @@ void finishDistanceConstraint(Gui::Command* cmd, Sketcher::SketchObject* sketch) vp->draw(); // Redraw } - ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher/General"); + ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher"); bool show = hGrp->GetBool("ShowDialogOnDistanceConstraint", true); // Ask for the value of the distance immediately @@ -2037,7 +2037,7 @@ void CmdSketcherConstrainRadius::activated(int iMsg) vp->draw(); // Redraw } - ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher/General"); + ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher"); bool show = hGrp->GetBool("ShowDialogOnDistanceConstraint", true); // Ask for the value of the radius immediately if (show) {