Browse Source

wxGUI: add missing parameters, avoid DB error when loading rules is stopped

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@49085 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 13 years ago
parent
commit
b8e02e549a
1 changed files with 7 additions and 3 deletions
  1. 7 3
      gui/wxpython/gui_modules/colorrules.py

+ 7 - 3
gui/wxpython/gui_modules/colorrules.py

@@ -898,6 +898,7 @@ class VectorColorTable(ColorTable):
         # 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 @@ class VectorColorTable(ColorTable):
                 else:
                     busy.Destroy()
                     dlg.Destroy()
+                    self.updateColumn = False
                     return
             
         self.rulesPanel.AddRules(i, start = True)
@@ -1570,8 +1572,10 @@ class VectorColorTable(ColorTable):
         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 @@ class VectorColorTable(ColorTable):
         else:
             self.UseAttrColumn(True)
         
-        return ColorTable.OnApply()
+        return ColorTable.OnApply(self, event)
         
 class ThematicVectorTable(VectorColorTable):
     def __init__(self, parent, vectorType, **kwargs):