[GRASS-SVN] r35573 - grass/trunk/gui/wxpython
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Jan 24 07:29:42 EST 2009
Author: martinl
Date: 2009-01-24 07:29:41 -0500 (Sat, 24 Jan 2009)
New Revision: 35573
Modified:
grass/trunk/gui/wxpython/wxgui.py
Log:
wxGUI: fix trac #460
(merge from devbr6, r35571)
Modified: grass/trunk/gui/wxpython/wxgui.py
===================================================================
--- grass/trunk/gui/wxpython/wxgui.py 2009-01-24 12:26:05 UTC (rev 35572)
+++ grass/trunk/gui/wxpython/wxgui.py 2009-01-24 12:29:41 UTC (rev 35573)
@@ -439,6 +439,8 @@
self.gm_cb.GetPage(event.GetSelection()).maptree.Map.Clean()
self.gm_cb.GetPage(event.GetSelection()).maptree.Close(True)
+ self.curr_page = None
+
event.Skip()
def OnRunCmd(self, event):
@@ -1448,10 +1450,14 @@
self.curr_page.maptree.Delete(layer)
def OnCloseWindow(self, event):
- """Cleanup when wxgui.py is quit"""
+ """Cleanup when wxGUI is quit"""
+ if not self.curr_page:
+ self._auimgr.UnInit()
+ self.Destroy()
+ return
+
+ maptree = self.curr_page.maptree
if UserSettings.Get(group='manager', key='askOnQuit', subkey='enabled'):
- maptree = self.curr_page.maptree
-
if self.workspaceFile:
message = _("Do you want to save changes in the workspace?")
else:
@@ -1480,10 +1486,12 @@
# don't ask any more...
UserSettings.Set(group = 'manager', key = 'askOnQuit', subkey = 'enabled',
value = False)
+
for page in range(self.gm_cb.GetPageCount()):
self.gm_cb.GetPage(0).maptree.mapdisplay.OnCloseWindow(event)
+
self.gm_cb.DeleteAllPages()
- # self.DestroyChildren()
+
self._auimgr.UnInit()
self.Destroy()
More information about the grass-commit
mailing list