[GRASS-SVN] r53061 - grass/trunk/gui/wxpython/lmgr

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Sep 2 12:23:09 PDT 2012


Author: annakrat
Date: 2012-09-02 12:23:08 -0700 (Sun, 02 Sep 2012)
New Revision: 53061

Modified:
   grass/trunk/gui/wxpython/lmgr/frame.py
Log:
wxGUI: fix closing gui from menu

Modified: grass/trunk/gui/wxpython/lmgr/frame.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/frame.py	2012-09-02 19:18:41 UTC (rev 53060)
+++ grass/trunk/gui/wxpython/lmgr/frame.py	2012-09-02 19:23:08 UTC (rev 53061)
@@ -1766,7 +1766,9 @@
                     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()



More information about the grass-commit mailing list