[GRASS-SVN] r53060 - grass/branches/develbranch_6/gui/wxpython/lmgr

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Sep 2 12:18:41 PDT 2012


Author: annakrat
Date: 2012-09-02 12:18:41 -0700 (Sun, 02 Sep 2012)
New Revision: 53060

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

Modified: grass/branches/develbranch_6/gui/wxpython/lmgr/frame.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/lmgr/frame.py	2012-09-02 19:16:53 UTC (rev 53059)
+++ grass/branches/develbranch_6/gui/wxpython/lmgr/frame.py	2012-09-02 19:18:41 UTC (rev 53060)
@@ -1757,7 +1757,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