Draft: fix issue with undo (#8267)

This commit is contained in:
Roy-043
2023-01-31 21:38:19 +01:00
committed by GitHub
parent 28df3265cc
commit f9cdaaf3d9
25 changed files with 249 additions and 117 deletions

View File

@@ -64,9 +64,13 @@ class Circle(DraftObject):
obj.MakeFace = utils.get_param("fillmode", True)
def execute(self, obj):
"""This method is run when the object is created or recomputed."""
if self.props_changed_placement_only():
obj.positionBySupport()
self.props_changed_clear()
return
import Part
plm = obj.Placement
@@ -88,8 +92,11 @@ class Circle(DraftObject):
obj.Area = shape.Area
obj.Placement = plm
obj.positionBySupport()
self.props_changed_clear()
def onChanged(self, obj, prop):
self.props_changed_store(prop)
# Alias for compatibility with v0.18 and earlier