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

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Aug 27 11:56:30 EDT 2011


Author: cmbarton
Date: 2011-08-27 08:56:30 -0700 (Sat, 27 Aug 2011)
New Revision: 47910

Modified:
   grass/trunk/gui/wxpython/gui_modules/colorrules.py
Log:
Moved error message about failed color rules creation to the OnApply methods.

Modified: grass/trunk/gui/wxpython/gui_modules/colorrules.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/colorrules.py	2011-08-27 15:23:20 UTC (rev 47909)
+++ grass/trunk/gui/wxpython/gui_modules/colorrules.py	2011-08-27 15:56:30 UTC (rev 47910)
@@ -528,6 +528,8 @@
         @return True on success otherwise False
         """
         ret = self.CreateColorTable()
+        if not ret:
+            gcmd.GMessage(parent = self, message = _("No valid color rules given."))
         if self.colorTable:
             self.UseAttrColumn(False)
         else:
@@ -679,7 +681,6 @@
             rulestxt += rule['value'] + ' ' + rule['color'] + '\n'
            
         if not rulestxt:
-            gcmd.GMessage(parent = self, message = _("No color rules given."))
             return False
         
         gtemp = utils.GetTempfile()
@@ -1633,7 +1634,7 @@
         
         ret = self.CreateColorTable()
         if not ret:
-            gcmd.GMessage(parent = self, message = _("No rules given."))
+            gcmd.GMessage(parent = self, message = _("No valid color rules given."))
         
         data = self.parent.GetLayerData(nvizType = 'vector')
         data['vector']['points']['thematic']['layer'] = int(self.properties['layer'])



More information about the grass-commit mailing list