Skip to content

Commit 5796a18

Browse files
committed
classes.updates: Add update_untracked method
Convenience method takes the same arguments as update(), and replaces: ``` app.updates.ignore_history = True app.updates.update(...) app.updates.ignore_history = False ```
1 parent 2b386db commit 5796a18

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/classes/updates.py

+7
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,13 @@ def update(self, key, values, partial_update=False):
322322
self.actionHistory.append(self.last_action)
323323
self.dispatch_action(self.last_action)
324324

325+
def update_untracked(self, key, values, partial_update=False):
326+
""" Update the UpdateManager with an UpdateAction, without creating a new entry in the history table (this action will then be distributed to all listeners) """
327+
previous_ignore = self.ignore_history
328+
self.ignore_history = True
329+
self.update(key, values, partial_update)
330+
self.ignore_history = previous_ignore
331+
325332
def delete(self, key):
326333
""" Delete an item from the UpdateManager with an UpdateAction (this action will then be distributed to all listeners) """
327334

0 commit comments

Comments
 (0)