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

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Aug 18 10:56:52 EDT 2011


Author: annakrat
Date: 2011-08-18 07:56:52 -0700 (Thu, 18 Aug 2011)
New Revision: 47742

Modified:
   grass/trunk/gui/wxpython/gui_modules/colorrules.py
Log:
wxGUI: vector rules dialog: fix modul name

Modified: grass/trunk/gui/wxpython/gui_modules/colorrules.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/colorrules.py	2011-08-18 14:43:48 UTC (rev 47741)
+++ grass/trunk/gui/wxpython/gui_modules/colorrules.py	2011-08-18 14:56:52 UTC (rev 47742)
@@ -1176,8 +1176,12 @@
             idx = int(idx)
             idx += 1
             self.properties['tmpColumn'] = name + '_' + str(idx)
-            
-        ret = gcmd.RunCommand('v.db.addcolumn',
+        
+        if self.version7:
+            modul = 'v.db.addcolumn'
+        else:
+            modul = 'v.db.addcol'
+        ret = gcmd.RunCommand(modul,
                               parent = self,
                               map = self.inmap,
                               layer = self.properties['layer'],
@@ -1186,11 +1190,14 @@
     def DeleteTemporaryColumn(self):
         """!Delete temporary column"""
         if self.inmap:
-            gcmd.RunCommand('v.db.dropcolumn',
-                            parent = self,
-                            map = self.inmap,
-                            layer = self.properties['layer'],
-                            column = self.properties['tmpColumn'])
+            if self.version7:
+                modul = 'v.db.dropcolumn'
+            else:
+                modul = 'v.db.dropcol'
+            ret = gcmd.RunCommand(modul,
+                                  map = self.inmap,
+                                  layer = self.properties['layer'],
+                                  column = self.properties['tmpColumn'])
         
     def OnLayerSelection(self, event):
         # reset choices in column selection comboboxes if layer changes
@@ -1232,7 +1239,11 @@
     def OnAddColumn(self, event):
         """!Add GRASS(RGB,SIZE,WIDTH) column if it doesn't exist"""
         if self.columnsProp[self.attributeType]['name'] not in self.fromColumn.GetItems():
-            ret = gcmd.RunCommand('v.db.addcolumn',
+            if self.version7:
+                modul = 'v.db.addcolumn'
+            else:
+                modul = 'v.db.addcol'
+            ret = gcmd.RunCommand(modul,
                                   map = self.inmap,
                                   layer = self.properties['layer'],
                                   columns = '%s %s' % (self.columnsProp[self.attributeType]['name'],



More information about the grass-commit mailing list