@@ -306,19 +306,19 @@ def insert(self, key, values):
306
306
""" Insert a new UpdateAction into the UpdateManager (this action will then be distributed to all listeners) """
307
307
308
308
self .last_action = UpdateAction ('insert' , key , values )
309
- self .redoHistory .clear ()
310
309
if not self .ignore_history :
310
+ self .redoHistory .clear ()
311
311
self .actionHistory .append (self .last_action )
312
312
self .dispatch_action (self .last_action )
313
313
314
314
def update (self , key , values , partial_update = False ):
315
315
""" Update the UpdateManager with an UpdateAction (this action will then be distributed to all listeners) """
316
316
317
317
self .last_action = UpdateAction ('update' , key , values , partial_update )
318
- if self .last_action .key and self .last_action .key [0 ] != "history" :
319
- # Clear redo history for any update except a "history" update
320
- self .redoHistory .clear ()
321
318
if not self .ignore_history :
319
+ if self .last_action .key and self .last_action .key [0 ] != "history" :
320
+ # Clear redo history for any update except a "history" update
321
+ self .redoHistory .clear ()
322
322
self .actionHistory .append (self .last_action )
323
323
self .dispatch_action (self .last_action )
324
324
@@ -333,8 +333,8 @@ def delete(self, key):
333
333
""" Delete an item from the UpdateManager with an UpdateAction (this action will then be distributed to all listeners) """
334
334
335
335
self .last_action = UpdateAction ('delete' , key )
336
- self .redoHistory .clear ()
337
336
if not self .ignore_history :
337
+ self .redoHistory .clear ()
338
338
self .actionHistory .append (self .last_action )
339
339
self .dispatch_action (self .last_action )
340
340
0 commit comments