[GRASS-SVN] r35572 - grass/branches/releasebranch_6_4/gui/wxpython
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Jan 24 07:26:05 EST 2009
Author: martinl
Date: 2009-01-24 07:26:05 -0500 (Sat, 24 Jan 2009)
New Revision: 35572
Modified:
grass/branches/releasebranch_6_4/gui/wxpython/wxgui.py
Log:
wxGUI: fix trac #460
(merge from devbr6, r35571)
Modified: grass/branches/releasebranch_6_4/gui/wxpython/wxgui.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/wxgui.py 2009-01-24 12:22:29 UTC (rev 35571)
+++ grass/branches/releasebranch_6_4/gui/wxpython/wxgui.py 2009-01-24 12:26:05 UTC (rev 35572)
@@ -440,6 +440,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):
@@ -1502,10 +1504,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:
@@ -1534,10 +1540,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