[GRASS-SVN] r44739 -
grass/branches/releasebranch_6_4/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Dec 26 14:01:21 EST 2010
Author: martinl
Date: 2010-12-26 11:01:21 -0800 (Sun, 26 Dec 2010)
New Revision: 44739
Modified:
grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/layertree.py
grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/render.py
Log:
wxGUI: add MapLayer.GetElement()
(merge r44737 from trunk)
Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/layertree.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/layertree.py 2010-12-26 19:01:05 UTC (rev 44738)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/layertree.py 2010-12-26 19:01:21 UTC (rev 44739)
@@ -1336,7 +1336,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/branches/releasebranch_6_4/gui/wxpython/gui_modules/render.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/render.py 2010-12-26 19:01:05 UTC (rev 44738)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/render.py 2010-12-26 19:01:21 UTC (rev 44739)
@@ -237,6 +237,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