[GRASS-SVN] r48913 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Oct 22 16:03:25 EDT 2011
Author: martinl
Date: 2011-10-22 13:03:25 -0700 (Sat, 22 Oct 2011)
New Revision: 48913
Modified:
grass/trunk/gui/wxpython/gui_modules/gdialogs.py
Log:
wxGUI: don't close GroupDialog when no group selected (OnOk)
Modified: grass/trunk/gui/wxpython/gui_modules/gdialogs.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/gdialogs.py 2011-10-22 17:43:42 UTC (rev 48912)
+++ grass/trunk/gui/wxpython/gui_modules/gdialogs.py 2011-10-22 20:03:25 UTC (rev 48913)
@@ -1162,7 +1162,7 @@
if not group:
gcmd.GMessage(parent = self,
message = _("No group selected."))
- return
+ return False
groups = self.GetExistGroups()
if group in groups:
@@ -1175,14 +1175,16 @@
self.groupChanged = False
+ return True
+
def OnApply(self, event):
"""!Apply changes"""
self.ApplyChanges(showResult = True)
def OnOk(self, event):
"""!Apply changes and close dialog"""
- self.ApplyChanges(showResult = False)
- self.OnClose(event)
+ if self.ApplyChanges(showResult = False):
+ self.OnClose(event)
def OnClose(self, event):
"""!Close dialog"""
More information about the grass-commit
mailing list