From 1bc942d73a00df6f70d71b3b2e20bc0289a2d190 Mon Sep 17 00:00:00 2001 From: Roy-043 Date: Mon, 6 Nov 2023 18:32:38 +0100 Subject: [PATCH] Draft: improved props_changed_placement_only function There are more objects where `props_changed_placement_only` should always return `False`. The common denominator seems to be a non-empty OutList. https://github.com/FreeCAD/FreeCAD/issues/8771 https://forum.freecad.org/viewtopic.php?t=82436 --- src/Mod/Draft/draftobjects/base.py | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/Mod/Draft/draftobjects/base.py b/src/Mod/Draft/draftobjects/base.py index c070b33349..f9bb21b86c 100644 --- a/src/Mod/Draft/draftobjects/base.py +++ b/src/Mod/Draft/draftobjects/base.py @@ -195,19 +195,13 @@ class DraftObject(object): if not hasattr(self, "props_changed"): return False - # For an attached object whose Shape depends on one or more source - # objects the situation can occur that when those source objects - # change its Placement is also changed, but for no apparent reason: - # the new Placement is identical to the old. For such an object a - # `placement_only` change cannot be detected reliably and therefore - # this function should return `False`. + # For some objects a dummy Placement property change (new and old + # Placement are the same) is used in cases where a full recompute is + # required. This function should then return `False`. The common + # denominator seems to be a non-empty OutList. # https://github.com/FreeCAD/FreeCAD/issues/8771 - if obj is not None \ - and obj.OutList \ - and hasattr(obj, "Support") \ - and hasattr(obj, "MapMode") \ - and obj.Support \ - and obj.MapMode != "Deactivated": + # https://forum.freecad.org/viewtopic.php?t=82436 + if obj is not None and obj.OutList: return False props = set(self.props_changed)