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

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Nov 3 16:28:09 EDT 2011


Author: annakrat
Date: 2011-11-03 13:28:09 -0700 (Thu, 03 Nov 2011)
New Revision: 49085

Modified:
   grass/trunk/gui/wxpython/gui_modules/colorrules.py
Log:
wxGUI: add missing parameters, avoid DB error when loading rules is stopped

Modified: grass/trunk/gui/wxpython/gui_modules/colorrules.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/colorrules.py	2011-11-03 19:58:23 UTC (rev 49084)
+++ grass/trunk/gui/wxpython/gui_modules/colorrules.py	2011-11-03 20:28:09 UTC (rev 49085)
@@ -898,6 +898,7 @@
         # in version 7 v.colors used, otherwise color column only
         self.version7 = int(grass.version()['version'].split('.')[0]) >= 7
         self.colorTable = False
+        self.updateColumn = True
         # vector properties
         self.properties = {
             # vector layer for attribute table to use for setting color
@@ -1416,6 +1417,7 @@
                 else:
                     busy.Destroy()
                     dlg.Destroy()
+                    self.updateColumn = False
                     return
             
         self.rulesPanel.AddRules(i, start = True)
@@ -1570,8 +1572,10 @@
         if self.colorTable:
             ret = ColorTable.CreateColorTable(self)
         else:
-            ret = self.UpdateColorColumn(tmp)
-            
+            if self.updateColumn:
+                ret = self.UpdateColorColumn(tmp)
+            else:
+                ret = True
         return ret
         
     def UpdateColorColumn(self, tmp):
@@ -1628,7 +1632,7 @@
         else:
             self.UseAttrColumn(True)
         
-        return ColorTable.OnApply()
+        return ColorTable.OnApply(self, event)
         
 class ThematicVectorTable(VectorColorTable):
     def __init__(self, parent, vectorType, **kwargs):



More information about the grass-commit mailing list