Skip to content

Commit

Permalink
classes.updates: Add update_untracked method
Browse files Browse the repository at this point in the history
Convenience method takes the same arguments as update(), and replaces:
```
app.updates.ignore_history = True
app.updates.update(...)
app.updates.ignore_history = False
```
  • Loading branch information
ferdnyc committed Dec 5, 2019
1 parent 2b386db commit 5796a18
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/classes/updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,13 @@ def update(self, key, values, partial_update=False):
self.actionHistory.append(self.last_action)
self.dispatch_action(self.last_action)

def update_untracked(self, key, values, partial_update=False):
""" Update the UpdateManager with an UpdateAction, without creating a new entry in the history table (this action will then be distributed to all listeners) """
previous_ignore = self.ignore_history
self.ignore_history = True
self.update(key, values, partial_update)
self.ignore_history = previous_ignore

def delete(self, key):
""" Delete an item from the UpdateManager with an UpdateAction (this action will then be distributed to all listeners) """

Expand Down

0 comments on commit 5796a18

Please sign in to comment.