[GRASS-SVN] r54892 - grass/trunk/gui/wxpython/mapdisp
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Feb 4 02:51:59 PST 2013
Author: wenzeslaus
Date: 2013-02-04 02:51:59 -0800 (Mon, 04 Feb 2013)
New Revision: 54892
Modified:
grass/trunk/gui/wxpython/mapdisp/frame.py
Log:
wxGUI/mapdisp: using giface for profile tool initialization, multiple rasters are now transfered, works for d.mon
Modified: grass/trunk/gui/wxpython/mapdisp/frame.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/frame.py 2013-02-04 10:23:49 UTC (rev 54891)
+++ grass/trunk/gui/wxpython/mapdisp/frame.py 2013-02-04 10:51:59 UTC (rev 54892)
@@ -1008,12 +1008,13 @@
def OnProfile(self, event):
"""!Launch profile tool
"""
- raster = []
- if self.tree.layer_selected and \
- self.tree.GetLayerInfo(self.tree.layer_selected, key = 'type') == 'raster':
- raster.append(self.tree.GetLayerInfo(self.tree.layer_selected, key = 'maplayer').name)
+ rasters = []
+ layers = self._giface.GetLayerList().GetSelectedLayers()
+ for layer in layers:
+ if layer.type == 'raster':
+ rasters.append(layer.maplayer.name)
- win = ProfileFrame(parent = self, rasterList = raster)
+ win = ProfileFrame(parent = self, rasterList = rasters)
win.CentreOnParent()
win.Show()
More information about the grass-commit
mailing list