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

@@ -181,6 +181,9 @@ class DraftLink(DraftObject):
else:
self.execute(obj)
# Object properties are updated when the document is opened.
self.props_changed_clear()
def buildShape(self, obj, pl, pls):
"""Build the shape of the link object."""
if self.use_link:
@@ -229,6 +232,8 @@ class DraftLink(DraftObject):
def onChanged(self, obj, prop):
"""Execute when a property changes."""
self.props_changed_store(prop)
if not getattr(self, 'use_link', False):
return