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

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Sep 3 03:50:23 PDT 2012


Author: annakrat
Date: 2012-09-03 03:50:23 -0700 (Mon, 03 Sep 2012)
New Revision: 53064

Modified:
   grass/trunk/gui/wxpython/lmgr/layertree.py
Log:
wxGUI: fixed #1717

Modified: grass/trunk/gui/wxpython/lmgr/layertree.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/layertree.py	2012-09-03 09:16:10 UTC (rev 53063)
+++ grass/trunk/gui/wxpython/lmgr/layertree.py	2012-09-03 10:50:23 UTC (rev 53064)
@@ -253,6 +253,22 @@
             self.SetFirstGradientColour(wx.Colour(100, 100, 100))
             self.SetSecondGradientColour(wx.Colour(150, 150, 150))
         
+    def GetSelections(self):
+        """Returns a list of selected items.
+
+        This method is copied from customtreecontrol and overriden because
+        with some version wx (?) multiple selection doesn't work. 
+        Probably it is caused by another GetSelections method in treemixin.DragAndDrop?
+        """
+        array = []
+        idRoot = self.GetRootItem()
+        if idRoot:
+            array = self.FillArray(idRoot, array)
+        
+        #else: the tree is empty, so no selections
+
+        return array
+
     def GetMap(self):
         """!Get map instace"""
         return self.Map
@@ -463,8 +479,9 @@
                 self.popupMenu.Enable(self.popupID['univar'],  False)
                 self.popupMenu.Enable(self.popupID['prof'],    False)
                 self.popupMenu.Enable(self.popupID['meta'],    False)
-                self.popupMenu.Enable(self.popupID['nviz'],    False)
                 self.popupMenu.Enable(self.popupID['export'],  False)
+                if self.lmgr.IsPaneShown('toolbarNviz'):
+                    self.popupMenu.Enable(self.popupID['nviz'], False)
 
         self.PopupMenu(self.popupMenu)
         self.popupMenu.Destroy()



More information about the grass-commit mailing list