[GRASS-SVN] r44737 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Dec 26 13:59:08 EST 2010
Author: martinl
Date: 2010-12-26 10:59:08 -0800 (Sun, 26 Dec 2010)
New Revision: 44737
Modified:
grass/trunk/gui/wxpython/gui_modules/layertree.py
grass/trunk/gui/wxpython/gui_modules/render.py
Log:
wxGUI: add MapLayer.GetElement()
Modified: grass/trunk/gui/wxpython/gui_modules/layertree.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/layertree.py 2010-12-26 18:53:25 UTC (rev 44736)
+++ grass/trunk/gui/wxpython/gui_modules/layertree.py 2010-12-26 18:59:08 UTC (rev 44737)
@@ -1335,7 +1335,7 @@
if not mapText or \
(mapLayer and \
- not grass.find_file(name = mapName, element = mapLayer.GetType())['fullname']):
+ not grass.find_file(name = mapName, element = mapLayer.GetElement())['fullname']):
propwin.Hide()
GWarning(parent = self,
message = _("Map <%s> not found.") % mapName)
Modified: grass/trunk/gui/wxpython/gui_modules/render.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/render.py 2010-12-26 18:53:25 UTC (rev 44736)
+++ grass/trunk/gui/wxpython/gui_modules/render.py 2010-12-26 18:59:08 UTC (rev 44737)
@@ -219,6 +219,12 @@
"""!Get map layer type"""
return self.type
+ def GetElement(self):
+ """!Get map element type"""
+ if self.type == 'raster':
+ return 'cell'
+ return self.type
+
def GetOpacity(self, float=False):
"""
Get layer opacity level
More information about the grass-commit
mailing list