mirror of
https://github.com/lalbornoz/roar.git
synced 2024-11-18 21:36:38 +00:00
libroar/RoarCanvasCommands.py:update(): disable undo if on last undo item.
This commit is contained in:
parent
245925406e
commit
866ef19966
@ -67,7 +67,8 @@ class RoarCanvasCommands(RoarCanvasCommandsFile, RoarCanvasCommandsEdit, RoarCan
|
|||||||
textItems.append("*")
|
textItems.append("*")
|
||||||
self.parentFrame.statusBar.SetStatusText(" | ".join(textItems))
|
self.parentFrame.statusBar.SetStatusText(" | ".join(textItems))
|
||||||
if "undoLevel" in self.lastPanelState:
|
if "undoLevel" in self.lastPanelState:
|
||||||
if self.lastPanelState["undoLevel"] >= 0:
|
if (self.lastPanelState["undoLevel"] >= 0) \
|
||||||
|
and (self.lastPanelState["undoLevel"] < (len(self.parentCanvas.canvas.journal.patchesUndo) - 1)):
|
||||||
self.parentFrame.menuItemsById[self.canvasUndo.attrDict["id"]].Enable(True)
|
self.parentFrame.menuItemsById[self.canvasUndo.attrDict["id"]].Enable(True)
|
||||||
toolBar = self.parentFrame.toolBarItemsById[self.canvasUndo.attrDict["id"]].GetToolBar()
|
toolBar = self.parentFrame.toolBarItemsById[self.canvasUndo.attrDict["id"]].GetToolBar()
|
||||||
toolBar.EnableTool(self.canvasUndo.attrDict["id"], True)
|
toolBar.EnableTool(self.canvasUndo.attrDict["id"], True)
|
||||||
|
Loading…
Reference in New Issue
Block a user