[GRASS-SVN] r32828 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Aug 16 18:54:00 EDT 2008


Author: cmbarton
Date: 2008-08-16 18:54:00 -0400 (Sat, 16 Aug 2008)
New Revision: 32828

Modified:
   grass/trunk/gui/wxpython/gui_modules/menuform.py
Log:
Backport of another bug fix for cancel problem

Modified: grass/trunk/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/menuform.py	2008-08-16 22:51:22 UTC (rev 32827)
+++ grass/trunk/gui/wxpython/gui_modules/menuform.py	2008-08-16 22:54:00 UTC (rev 32828)
@@ -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