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

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Dec 13 11:32:09 EST 2010


Author: martinl
Date: 2010-12-13 08:32:08 -0800 (Mon, 13 Dec 2010)
New Revision: 44600

Modified:
   grass/trunk/gui/wxpython/gui_modules/colorrules.py
Log:
wxGUI: fix colorrules.py for vectors
(merge r44599 from devbr6)


Modified: grass/trunk/gui/wxpython/gui_modules/colorrules.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/colorrules.py	2010-12-13 16:30:29 UTC (rev 44599)
+++ grass/trunk/gui/wxpython/gui_modules/colorrules.py	2010-12-13 16:32:08 UTC (rev 44600)
@@ -661,14 +661,15 @@
         for rule in self.ruleslines.itervalues():
             if not rule['value']: # skip empty rules
                 continue
-            if rule['value'] not in ('nv', 'default') and \
-                    rule['value'][-1] != '%' and \
-                    not self._IsNumber(rule['value']):
-                gcmd.GError(_("Invalid rule value '%s'. Unable to apply color table.") % rule['value'],
-                            parent = self)
-                return False
             
             if self.raster:
+                if rule['value'] not in ('nv', 'default') and \
+                        rule['value'][-1] != '%' and \
+                        not self._IsNumber(rule['value']):
+                    gcmd.GError(_("Invalid rule value '%s'. Unable to apply color table.") % rule['value'],
+                                parent = self)
+                    return False
+                
                 rulestxt += rule['value'] + ' ' + rule['color'] + '\n'
             else:
                 rulestxt += "UPDATE %s SET %s='%s' WHERE %s ;\n" % (self.properties['table'],



More information about the grass-commit mailing list