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

@@ -86,6 +86,12 @@ class Clone(DraftObject):
return Part.makeCompound(shapes)
def execute(self,obj):
if self.props_changed_placement_only():
if hasattr(obj,"positionBySupport"):
obj.positionBySupport()
self.props_changed_clear()
return
import Part
pl = obj.Placement
shapes = []
@@ -118,6 +124,10 @@ class Clone(DraftObject):
obj.Placement = pl
if hasattr(obj,"positionBySupport"):
obj.positionBySupport()
self.props_changed_clear()
def onChanged(self, obj, prop):
self.props_changed_store(prop)
def getSubVolume(self,obj,placement=None):
# this allows clones of arch windows to return a subvolume too