From a51640b186663d1d2b5e1371e238ec3ec371b7dd Mon Sep 17 00:00:00 2001 From: "FeRD (Frank Dana)" Date: Sun, 19 Jan 2020 04:45:17 -0500 Subject: [PATCH] classes/updates: Notify watchers when needed Co-authored-by: SuslikV --- src/classes/updates.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/classes/updates.py b/src/classes/updates.py index 30177ad0c1..bcc0d7e8b5 100644 --- a/src/classes/updates.py +++ b/src/classes/updates.py @@ -192,6 +192,9 @@ def reset(self): self.actionHistory.clear() self.redoHistory.clear() + # Notify watchers of new history state + self.update_watchers() + def add_listener(self, listener, index=-1): """ Add a new listener (which will invoke the changed(action) method each time an UpdateAction is available). """ @@ -343,3 +346,6 @@ def apply_last_action_to_history(self, previous_value): if self.last_action: self.last_action.set_old_values(previous_value) self.actionHistory.append(self.last_action) + + # Notify watchers of new history state + self.update_watchers()