[GRASS-SVN] r47556 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Aug 11 16:14:07 EDT 2011
Author: cmbarton
Date: 2011-08-11 13:14:07 -0700 (Thu, 11 Aug 2011)
New Revision: 47556
Modified:
grass/trunk/gui/wxpython/gui_modules/colorrules.py
Log:
Fixing various bugs
Modified: grass/trunk/gui/wxpython/gui_modules/colorrules.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/colorrules.py 2011-08-11 19:21:47 UTC (rev 47555)
+++ grass/trunk/gui/wxpython/gui_modules/colorrules.py 2011-08-11 20:14:07 UTC (rev 47556)
@@ -1050,7 +1050,7 @@
self.cb_color_att.SetSelection(0)
self.properties['source_rgb'] = self.cb_color_att.GetString(0)
self.cb_rgb_col.InsertColumns(vector = self.inmap, layer = vlayer, type = ["character"], dbInfo = self.dbInfo)
- self.cb_rgb_col.Delete(self.cb_rgb_col.FindString(self.properties['source_rgb']))
+# self.cb_rgb_col.Delete(self.cb_rgb_col.FindString(self.properties['source_rgb']))
found = self.cb_rgb_col.FindString('GRASSRGB')
if found != wx.NOT_FOUND:
self.cb_rgb_col.SetSelection(found)
@@ -1244,6 +1244,7 @@
input = gtemp)
return True
+
## def ColorFromString(self, rgb):
## """!Convert color string '255:255:255' to tuple"""
## try:
@@ -1580,9 +1581,12 @@
@return True on success otherwise False
"""
- ret = self.CreateColorTable()
+ ret = VectorColorTable.CreateColorTable(self)
if not ret:
- GMessage(parent = self, message = _("No color rules given."))
+ gcmd.GMessage(parent = self, message = _("No color rules given."))
+ ret = self.CreateSizeTable()
+ if not ret:
+ gcmd.GMessage(parent = self, message = _("No size rules given."))
data = self.parent.GetLayerData(nvizType = 'vector')
data['vector']['points']['thematic']['layer'] = int(self.properties['layer'])
@@ -1605,8 +1609,8 @@
return ret
- def CreateColorTable(self, force = False):
- """!Creates color table
+ def CreateSizeTable(self, force = False):
+ """!Creates size table
@return True on success
@return False on failure
More information about the grass-commit
mailing list