[GRASS-SVN] r35571 - grass/branches/develbranch_6/gui/wxpython
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Jan 24 07:22:29 EST 2009
Author: martinl
Date: 2009-01-24 07:22:29 -0500 (Sat, 24 Jan 2009)
New Revision: 35571
Modified:
grass/branches/develbranch_6/gui/wxpython/wxgui.py
Log:
wxGUI: fix trac #460
Modified: grass/branches/develbranch_6/gui/wxpython/wxgui.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/wxgui.py 2009-01-24 04:01:25 UTC (rev 35570)
+++ grass/branches/develbranch_6/gui/wxpython/wxgui.py 2009-01-24 12:22:29 UTC (rev 35571)
@@ -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):
@@ -1492,10 +1494,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:
@@ -1524,10 +1530,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