[GRASS-SVN] r53274 - grass/trunk/gui/wxpython/wxplot

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Sep 27 01:19:24 PDT 2012


Author: marisn
Date: 2012-09-27 01:19:24 -0700 (Thu, 27 Sep 2012)
New Revision: 53274

Modified:
   grass/trunk/gui/wxpython/wxplot/base.py
Log:
Allow black in wxplot (prevents key error); Prevent list index error.

Modified: grass/trunk/gui/wxpython/wxplot/base.py
===================================================================
--- grass/trunk/gui/wxpython/wxplot/base.py	2012-09-26 17:10:31 UTC (rev 53273)
+++ grass/trunk/gui/wxpython/wxplot/base.py	2012-09-27 08:19:24 UTC (rev 53274)
@@ -115,7 +115,7 @@
                 
         self.colorDict = {}
         for clr in grass.named_colors.iterkeys():
-            if clr == 'white' or clr == 'black': continue
+            if clr == 'white': continue
             r = grass.named_colors[clr][0] * 255
             g = grass.named_colors[clr][1] * 255
             b = grass.named_colors[clr][2] * 255
@@ -217,7 +217,7 @@
             else:
                 rdict[r]['pstyle'] = 'solid'
                         
-            if idx <= len(self.colorList):
+            if idx < len(self.colorList):
                 if idx == 0:
                     # use saved color for first plot
                     if self.properties['raster']['pcolor'] != None:



More information about the grass-commit mailing list