[GRASS-SVN] r54905 - grass/trunk/gui/wxpython/mapdisp

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Feb 4 08:10:15 PST 2013


Author: wenzeslaus
Date: 2013-02-04 08:10:13 -0800 (Mon, 04 Feb 2013)
New Revision: 54905

Modified:
   grass/trunk/gui/wxpython/mapdisp/frame.py
Log:
wxGUI/mapdisp: using giface to initialize scatterplot and tmp vector map

Modified: grass/trunk/gui/wxpython/mapdisp/frame.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/frame.py	2013-02-04 16:02:54 UTC (rev 54904)
+++ grass/trunk/gui/wxpython/mapdisp/frame.py	2013-02-04 16:10:13 UTC (rev 54905)
@@ -884,7 +884,8 @@
         # icon used in vector display and its size
         icon = ''
         size = 0
-        vparam = self.tree.GetLayerInfo(self.tree.layer_selected, key = 'cmd')
+        # here we know that there is one selected layer and it is vector
+        vparam = self._giface.GetLayerList().GetSelectedLayers()[0].cmd
         for p in vparam:
             if '=' in p:
                 parg,pval = p.split('=', 1)
@@ -1094,11 +1095,10 @@
         """
         raster = []
 
-        for layer in self.tree.GetSelections():
-            if self.tree.GetLayerInfo(layer, key = 'maplayer').GetType() != 'raster':
-                continue
-            raster.append(self.tree.GetLayerInfo(layer, key = 'maplayer').GetName())
-            
+        for layer in self._giface.GetLayerList().GetSelectedLayers():
+            if layer.maplayer.GetType() == 'raster':
+                raster.append(layer.maplayer.GetName())
+
         win = ScatterFrame(parent = self, rasterList = raster)
         
         win.CentreOnParent()



More information about the grass-commit mailing list