Skip to content

Commit a51640b

Browse files
ferdnycSuslikV
and
SuslikV
committed
classes/updates: Notify watchers when needed
Co-authored-by: SuslikV <[email protected]>
1 parent a8a641c commit a51640b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/classes/updates.py

+6
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,9 @@ def reset(self):
192192
self.actionHistory.clear()
193193
self.redoHistory.clear()
194194

195+
# Notify watchers of new history state
196+
self.update_watchers()
197+
195198
def add_listener(self, listener, index=-1):
196199
""" Add a new listener (which will invoke the changed(action) method each time an UpdateAction is available). """
197200

@@ -343,3 +346,6 @@ def apply_last_action_to_history(self, previous_value):
343346
if self.last_action:
344347
self.last_action.set_old_values(previous_value)
345348
self.actionHistory.append(self.last_action)
349+
350+
# Notify watchers of new history state
351+
self.update_watchers()

0 commit comments

Comments
 (0)