Browse Source

wxGUI: fix closing gui from menu

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@53061 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 12 years ago
parent
commit
199b89a595
1 changed files with 3 additions and 1 deletions
  1. 3 1
      gui/wxpython/lmgr/frame.py

+ 3 - 1
gui/wxpython/lmgr/frame.py

@@ -1766,7 +1766,9 @@ class GMFrame(wx.Frame):
                     else:
                         self.SaveToWorkspaceFile(self.workspaceFile)
                 elif ret == wx.ID_CANCEL:
-                    event.Veto()
+                    # when called from menu, it gets CommandEvent and not CloseEvent
+                    if hasattr(event, 'Veto'):
+                        event.Veto()
                     dlg.Destroy()
                     return
                 dlg.Destroy()