Sketcher: Auto Update Mode bug fix

==================================

Bug:
http://forum.freecadweb.org/viewtopic.php?f=10&t=11341&start=60#p92422

Why?
- When coding Auto Update Mode I forgot to solve the sketch when the constraint is cancelled to restore the solver level constraints.
This commit is contained in:
Abdullah Tahiri 2015-06-23 13:48:21 +02:00 committed by wmayer
parent 82e24d830e
commit 1fc88ebe24

View File

@ -179,6 +179,14 @@ void openEditDatumDialog(Sketcher::SketchObject* sketch, int ConstrNbr)
else {
// command canceled
Gui::Command::abortCommand();
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher");
bool autoRecompute = hGrp->GetBool("AutoRecompute",false);
if(autoRecompute) // upon cancelling we have to solve again to remove the constraint from the solver
Gui::Command::updateActive();
else
sketch->solve(); // we have to update the solver after this aborted addition.
}
}
}
@ -2463,6 +2471,8 @@ void CmdSketcherConstrainRadius::activated(int iMsg)
else {
// command canceled
abortCommand();
updateNeeded=true;
}
}
else {
@ -2483,6 +2493,8 @@ void CmdSketcherConstrainRadius::activated(int iMsg)
if(autoRecompute)
Gui::Command::updateActive();
else
Obj->solve();
}
}