[GRASS-SVN] r32827 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Aug 16 18:51:22 EDT 2008


Author: cmbarton
Date: 2008-08-16 18:51:22 -0400 (Sat, 16 Aug 2008)
New Revision: 32827

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
Log:
Another fix to the insidious cancel bug. Hard to stamp out.

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py	2008-08-16 20:49:13 UTC (rev 32826)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py	2008-08-16 22:51:22 UTC (rev 32827)
@@ -826,16 +826,15 @@
         """Cancel button pressed"""
         self.MakeModal(False)
         if self.get_dcmd:
-            # display decorations
-            if self.task.name == 'd.barscale' or self.task.name == 'd.legend':
+            # display decorations and 
+            # pressing OK or cancel after setting layer properties
+            if self.task.name == 'd.barscale' or self.task.name == 'd.legend' \
+                or len(self.parent.GetPyData(self.layer)[0]['cmd']) >= 1:
                 self.Hide()
             # canceled layer with nothing set
             elif len(self.parent.GetPyData(self.layer)[0]['cmd']) < 1:
                 self.parent.Delete(self.layer)
                 self.Destroy()
-            # pressing OK after setting layer properties
-            else:
-                self.Destroy()
         else:
             # cancel for non-display commands
             self.Destroy()



More information about the grass-commit mailing list