From f773dfad91e7b0923028a114eba35f9cd7172fbd Mon Sep 17 00:00:00 2001 From: Roy-043 Date: Mon, 6 Jan 2025 17:23:37 +0100 Subject: [PATCH] Draft: props_changed_placement_only should ignore material props The new material related properties (Density, Volume and Mass) must be ignored by the `props_changed_placement_only` function. Without this moving a Draft_Point will fail for example. --- src/Mod/Draft/draftobjects/base.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Mod/Draft/draftobjects/base.py b/src/Mod/Draft/draftobjects/base.py index f9bb21b86c..ca3860987d 100644 --- a/src/Mod/Draft/draftobjects/base.py +++ b/src/Mod/Draft/draftobjects/base.py @@ -183,8 +183,9 @@ class DraftObject(object): delattr(self, "props_changed") def props_changed_placement_only(self, obj=None): - """Return `True` if the self.props_changed list, after removing `Shape` - and `_LinkTouched` items, only contains `Placement` items. + """Return `True` if the self.props_changed list, after removing + `_LinkTouched`, `Shape`, `Density`, `Volume` and `Mass` items, + only contains `Placement` items. Parameters ---------- @@ -205,10 +206,9 @@ class DraftObject(object): return False props = set(self.props_changed) - if "Shape" in props: - props.remove("Shape") - if "_LinkTouched" in props: - props.remove("_LinkTouched") + for prop in ("_LinkTouched", "Shape", "Density", "Volume", "Mass"): + if prop in props: + props.remove(prop) return props == {"Placement"}