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

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Nov 3 15:53:17 EDT 2011


Author: annakrat
Date: 2011-11-03 12:53:17 -0700 (Thu, 03 Nov 2011)
New Revision: 49083

Modified:
   grass/trunk/gui/wxpython/gui_modules/wxnviz.py
Log:
wxNviz: forgot to commit in r49082

Modified: grass/trunk/gui/wxpython/gui_modules/wxnviz.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/wxnviz.py	2011-11-03 19:35:35 UTC (rev 49082)
+++ grass/trunk/gui/wxpython/gui_modules/wxnviz.py	2011-11-03 19:53:17 UTC (rev 49083)
@@ -967,6 +967,29 @@
         """
         return Vect_read_colors(name, mapset, self.color)
         
+    def CheckColorTable(self, id, type):
+        """!Check if color table exists.
+        
+        @param id vector set id
+        @param type vector set type (lines/points)
+        
+        @return 1 color table exists
+        @return 0 no color table found
+        @return -1 on error
+        @return -2 vector set not found
+        """
+        file = c_char_p()
+        
+        if type == 'points':
+            ret = GP_get_sitename(id, byref(file))
+        elif type == 'lines':
+            ret = GV_get_vectname(id, byref(file))
+            
+        if ret < 0:
+            return -2
+        
+        return self.ReadVectorColors(file, "")
+        
     def SetPointsStyleThematic(self, id, layer, color = None, colorTable = False, 
                                width = None, size = None, symbol = None):
         """!Set thematic style for vector points



More information about the grass-commit mailing list