[GRASS-SVN] r44738 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Dec 26 14:01:05 EST 2010


Author: martinl
Date: 2010-12-26 11:01:05 -0800 (Sun, 26 Dec 2010)
New Revision: 44738

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/layertree.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/render.py
Log:
wxGUI: add MapLayer.GetElement()
(merge r44737 from trunk)


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/layertree.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/layertree.py	2010-12-26 18:59:08 UTC (rev 44737)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/layertree.py	2010-12-26 19:01:05 UTC (rev 44738)
@@ -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/develbranch_6/gui/wxpython/gui_modules/render.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/render.py	2010-12-26 18:59:08 UTC (rev 44737)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/render.py	2010-12-26 19:01:05 UTC (rev 44738)
@@ -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