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.
This commit is contained in:
Zheng, Lei
2019-08-22 18:33:27 +08:00
committed by wmayer
parent 2b79025ad9
commit 5bef136deb

View File

@@ -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());
}
}