Explorar o código

wxGUI: set color table interactively only when one raster is selected

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@70277 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa %!s(int64=8) %!d(string=hai) anos
pai
achega
5d3dec222e
Modificáronse 1 ficheiros con 8 adicións e 7 borrados
  1. 8 7
      gui/wxpython/lmgr/layertree.py

+ 8 - 7
gui/wxpython/lmgr/layertree.py

@@ -773,13 +773,14 @@ class LayerTree(treemixin.DragAndDrop, CT.CustomTreeCtrl):
                 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,