Sketcher: Fix recompute issue

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

Bug:
https://forum.freecadweb.org/viewtopic.php?f=3&t=64548

Apparently a find/replace gone wrong when moving code in:
13db9f7595d6839b46f11527baafed97b415d4fa
This commit is contained in:
Abdullah Tahiri
2021-12-17 15:05:51 +01:00
parent db936b60c4
commit 21e8aaab32

View File

@@ -61,23 +61,23 @@ using namespace Sketcher;
bool SketcherGui::tryAutoRecompute(Sketcher::SketchObject* obj, bool &autoremoveredundants)
{
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher");
bool autoUtils = hGrp->GetBool("AutoUtils",false);
bool autoRecompute = hGrp->GetBool("AutoRecompute",false);
bool autoRemoveRedundants = hGrp->GetBool("AutoRemoveRedundants",false);
// We need to make sure the solver has right redundancy information before trying to remove the redundants.
// for example if a non-driving constraint has been added.
if(autoRemoveRedundants && autoUtils)
if(autoRemoveRedundants && autoRecompute)
obj->solve();
if(autoRemoveRedundants)
obj->autoRemoveRedundants();
if (autoUtils)
if (autoRecompute)
Gui::Command::updateActive();
autoremoveredundants = autoRemoveRedundants;
return autoUtils;
return autoRecompute;
}
bool SketcherGui::tryAutoRecompute(Sketcher::SketchObject* obj)