Browse Source

wxGUI vdigit: fix Undo/Redo tool when no map edited (#586)

Tomas Zigo 5 years ago
parent
commit
062b8af02d
1 changed files with 4 additions and 2 deletions
  1. 4 2
      gui/wxpython/vdigit/toolbars.py

+ 4 - 2
gui/wxpython/vdigit/toolbars.py

@@ -495,13 +495,15 @@ class VDigitToolbar(BaseToolbar):
 
     def OnUndo(self, event):
         """Undo previous changes"""
-        self.digit.Undo()
+        if self.digit:
+            self.digit.Undo()
 
         event.Skip()
 
     def OnRedo(self, event):
         """Undo previous changes"""
-        self.digit.Undo(level=1)
+        if self.digit:
+            self.digit.Undo(level=1)
 
         event.Skip()