[Sketcher] 'Avoid redundant autoconstraint' is processed only if 'Autoconstraints' is active

This commit is contained in:
0penBrain
2020-04-11 16:00:24 +02:00
committed by abdullahtahiriyo
parent fece0f2dfc
commit 23e26e2ca6

View File

@@ -362,7 +362,7 @@ public:
}
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher");
bool avoidredundant = hGrp->GetGroup("General")->GetBool("AvoidRedundantAutoconstraints",true);
bool avoidredundant = hGrp->GetGroup("General")->GetBool("AvoidRedundantAutoconstraints",true) && sketchgui->Autoconstraints.getValue();
if(avoidredundant)
removeRedundantHorizontalVertical(static_cast<Sketcher::SketchObject *>(sketchgui->getObject()),sugConstr1,sugConstr2);
@@ -1167,7 +1167,7 @@ public:
}
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher");
bool avoidredundant = hGrp->GetGroup("General")->GetBool("AvoidRedundantAutoconstraints",true);
bool avoidredundant = hGrp->GetGroup("General")->GetBool("AvoidRedundantAutoconstraints",true) && sketchgui->Autoconstraints.getValue();
if (Mode == STATUS_Close) {