[GRASS-SVN] r70277 - grass/trunk/gui/wxpython/lmgr

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Jan 6 09:30:28 PST 2017


Author: martinl
Date: 2017-01-06 09:30:27 -0800 (Fri, 06 Jan 2017)
New Revision: 70277

Modified:
   grass/trunk/gui/wxpython/lmgr/layertree.py
Log:
wxGUI: set color table interactively only when one raster is selected

Modified: grass/trunk/gui/wxpython/lmgr/layertree.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/layertree.py	2017-01-06 17:19:59 UTC (rev 70276)
+++ grass/trunk/gui/wxpython/lmgr/layertree.py	2017-01-06 17:30:27 UTC (rev 70277)
@@ -773,13 +773,14 @@
                 wx.EVT_MENU,
                 self.OnRasterColorTable,
                 id=self.popupID['color'])
-            self.popupMenu.Append(
-                self.popupID['colori'],
-                _("Set color table interactively"))
-            self.Bind(
-                wx.EVT_MENU,
-                self.lmgr.OnRasterRules,
-                id=self.popupID['colori'])
+            if len(selected) < 2:
+                self.popupMenu.Append(
+                    self.popupID['colori'],
+                    _("Set color table interactively"))
+                self.Bind(
+                    wx.EVT_MENU,
+                    self.lmgr.OnRasterRules,
+                    id=self.popupID['colori'])
 
             item = wx.MenuItem(
                 self.popupMenu,



More information about the grass-commit mailing list