From 5bef136deb1a22c1202c76645210f51013da95ab Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Thu, 22 Aug 2019 18:33:27 +0800 Subject: [PATCH] TechDraw: avoid touching children if possible There are lots of dependency inversion problem in TechDraw, the ideal organization should let a child depend on project group, instead of the other way round, e.g. using PropertyLinkListHidden. This patch is just a cheap fix. The problem occurs when the user uses any expression to update properties like Scale in a projection group. The Scale property will be changed on recomputing projection group, which triggers children update, but since the group depends on the children, the children has already been recomputed. --- src/Mod/TechDraw/App/DrawProjGroup.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mod/TechDraw/App/DrawProjGroup.cpp b/src/Mod/TechDraw/App/DrawProjGroup.cpp index 03e47603905b..ca8f060b5b4a 100644 --- a/src/Mod/TechDraw/App/DrawProjGroup.cpp +++ b/src/Mod/TechDraw/App/DrawProjGroup.cpp @@ -865,7 +865,7 @@ void DrawProjGroup::updateChildren(void) Base::Console().Log("PROBLEM - DPG::updateChildren - non DPGI entry in Views! %s\n", getNameInDocument()); throw Base::TypeError("Error: projection in DPG list is not a DPGI!"); - } else { + } else if(view->Scale.getValue()!=Scale.getValue()) { view->Scale.setValue(Scale.getValue()); } } @@ -883,7 +883,7 @@ void DrawProjGroup::updateChildrenSource(void) Base::Console().Log("PROBLEM - DPG::updateChildrenSource - non DPGI entry in Views! %s\n", getNameInDocument()); throw Base::TypeError("Error: projection in DPG list is not a DPGI!"); - } else { + } else if (view->Source.getValues() != Source.getValues()) { view->Source.setValues(Source.getValues()); } }