Skip to content

Commit

Permalink
Bug fix: Sketcher: "Ask for value after creating distance constraint"…
Browse files Browse the repository at this point in the history
… 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");
  • Loading branch information
abdullahtahiriyo authored and wwmayer committed May 26, 2015
1 parent a2bdc36 commit 81bd2cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Mod/Sketcher/Gui/CommandConstraints.cpp
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 81bd2cf

Please sign in to comment.