Sketcher: Allow driven constraints when autoredundancy removal and autorecomputes active

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

https://forum.freecadweb.org/viewtopic.php?f=3&t=31998#p266626
This commit is contained in:
Abdullah Tahiri
2018-11-03 16:41:04 +01:00
committed by Yorik van Havre
parent 0cd1066abc
commit da890f2863

View File

@@ -669,6 +669,11 @@ bool SketcherGui::tryAutoRecompute(Sketcher::SketchObject* obj, bool &autoremove
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 && autoRecompute)
obj->solve();
if(autoRemoveRedundants)
obj->autoRemoveRedundants();