Skip to content

Commit

Permalink
TechDraw: avoid touching children if possible
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
realthunder authored and wwmayer committed Aug 30, 2019
1 parent 2b79025 commit 5bef136
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Mod/TechDraw/App/DrawProjGroup.cpp
Expand Up @@ -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());
}
}
Expand All @@ -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());
}
}
Expand Down

0 comments on commit 5bef136

Please sign in to comment.