[GRASS-SVN] r48596 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Oct 2 16:24:21 EDT 2011


Author: martinl
Date: 2011-10-02 13:24:21 -0700 (Sun, 02 Oct 2011)
New Revision: 48596

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/colorrules.py
Log:
wxGUI: fix RasterColorTable - OnApply()


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/colorrules.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/colorrules.py	2011-10-02 17:18:14 UTC (rev 48595)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/colorrules.py	2011-10-02 20:24:21 UTC (rev 48596)
@@ -519,22 +519,18 @@
           
     def OnApply(self, event):
         """!Apply selected color table
-
+        
         @return True on success otherwise False
         """
         ret = self.CreateColorTable()
         if not ret:
             gcmd.GMessage(parent = self, message = _("No valid color rules given."))
-
-        if self.colorTable:
-            self.UseAttrColumn(False)
-        else:
-            self.UseAttrColumn(True)            
+        
         if ret:
             display = self.parent.GetLayerTree().GetMapDisplay()
             if display and display.IsAutoRendered():
                 display.GetWindow().UpdateMap(render = True)
-           
+        
         return ret
 
     def OnOK(self, event):
@@ -1604,7 +1600,19 @@
         self.DeleteTemporaryColumn()
         self.Map.Clean()
         self.Destroy()
+
+    def OnApply(self, event):
+        """!Apply selected color table
         
+        @return True on success otherwise False
+        """
+        if self.colorTable:
+            self.UseAttrColumn(False)
+        else:
+            self.UseAttrColumn(True)
+        
+        return ColorTable.OnApply()
+        
 class ThematicVectorTable(VectorColorTable):
     def __init__(self, parent, vectorType, **kwargs):
         """!Dialog for interactively entering color/size rules
@@ -1625,7 +1633,6 @@
 
         @return True on success otherwise False
         """
-        
         ret = self.CreateColorTable()
         if not ret:
             gcmd.GMessage(parent = self, message = _("No valid color rules given."))
@@ -1812,4 +1819,4 @@
     def EraseMap(self):
         """!Erase preview"""
         self.Draw(self.pdc, pdctype = 'clear')
-    
\ No newline at end of file
+    



More information about the grass-commit mailing list