Add clear undo

This commit is contained in:
Mauricio Baeza 2020-11-10 22:35:46 -06:00
parent 00e4d0a376
commit 278c631cdd
2 changed files with 4 additions and 4 deletions

View File

@ -272,10 +272,6 @@ class LOCalc(LODocument):
self.cell_style[name] = obj
return LOCellStyle(obj)
def clear_undo(self):
self.obj.getUndoManager().clear()
return
def filter_by_color(self, cell=None):
if cell is None:
cell = self.selection.first

View File

@ -1067,6 +1067,10 @@ class LODocument(object):
else:
um.enterHiddenUndoContext()
def clear_undo(self):
self.obj.getUndoManager().clear()
return
@property
def selection(self):
sel = self.obj.CurrentSelection