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

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Apr 7 06:00:17 EDT 2008


Author: martinl
Date: 2008-04-07 06:00:17 -0400 (Mon, 07 Apr 2008)
New Revision: 30883

Modified:
   grass/trunk/gui/wxpython/gui_modules/gdialogs.py
Log:
wxGUI (gdialogs): Enable 'OK' when 'map' is already defined for legend


Modified: grass/trunk/gui/wxpython/gui_modules/gdialogs.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/gdialogs.py	2008-04-07 07:19:51 UTC (rev 30882)
+++ grass/trunk/gui/wxpython/gui_modules/gdialogs.py	2008-04-07 10:00:17 UTC (rev 30883)
@@ -274,6 +274,11 @@
         # create overlay if doesn't exist
         self._CreateOverlay()
 
+        if self.parent.MapWindow.overlays[self.ovlId]['params']:
+            for p in self.parent.MapWindow.overlays[self.ovlId]['params']['params']:
+                if p.get('name', '') == 'map' and p.get('value', '') != '':
+                    self.btnOK.Enable()
+        
     def _CreateOverlay(self):
         if not self.parent.Map.GetOverlay(self.ovlId):
             overlay = self.parent.Map.AddOverlay(id=self.ovlId, type=self.name,
@@ -282,7 +287,7 @@
 
             self.parent.MapWindow.overlays[self.ovlId] = {}
             self.parent.MapWindow.overlays[self.ovlId] = { 'layer' : overlay,
-                                                           'params' : '',
+                                                           'params' : None,
                                                            'propwin' : None,
                                                            'cmd' : [self.cmd],
                                                            'coords': (10, 10),



More information about the grass-commit mailing list