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

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Oct 22 10:18:09 EDT 2008


Author: martinl
Date: 2008-10-22 10:18:09 -0400 (Wed, 22 Oct 2008)
New Revision: 33978

Modified:
   grass/trunk/gui/wxpython/gui_modules/colorrules.py
Log:
wxGUI/colortable: allow percent value
(merge from devbr6, r33977)


Modified: grass/trunk/gui/wxpython/gui_modules/colorrules.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/colorrules.py	2008-10-22 14:16:32 UTC (rev 33977)
+++ grass/trunk/gui/wxpython/gui_modules/colorrules.py	2008-10-22 14:18:09 UTC (rev 33978)
@@ -451,9 +451,10 @@
         if self.elem == 'cell':
 
             try:
-                if vals != '-':
+                if vals != '-' and \
+                        vals[-1] != '%':
                     float(vals)
-            except ValueError:
+            except (IndexError, ValueError):
                 tc.SetValue('')
                 self.ruleslines[num-1000]['value'] = ''
                 return



More information about the grass-commit mailing list