[GRASS-SVN] r49025 - grass/trunk/gui/wxpython

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Oct 31 12:31:09 EDT 2011


Author: martinl
Date: 2011-10-31 09:31:09 -0700 (Mon, 31 Oct 2011)
New Revision: 49025

Modified:
   grass/trunk/gui/wxpython/wxgui.py
Log:
wxGUI: fix AddMaps() / add support for 3D raster map layers
       (merge r49024 from devbr6)


Modified: grass/trunk/gui/wxpython/wxgui.py
===================================================================
--- grass/trunk/gui/wxpython/wxgui.py	2011-10-31 16:25:58 UTC (rev 49024)
+++ grass/trunk/gui/wxpython/wxgui.py	2011-10-31 16:31:09 UTC (rev 49025)
@@ -1355,10 +1355,18 @@
         maptree = self.curr_page.maptree
         
         for layerName in dialog.GetMapLayers():
-            if dialog.GetLayerType() == 'raster':
+            ltype = dialog.GetLayerType(cmd = True)
+            if ltype == 'rast':
                 cmd = ['d.rast', 'map=%s' % layerName]
-            elif dialog.GetLayerType() == 'vector':
+            elif ltype == 'rast3d':
+                cmd = ['d.rast3d', 'map=%s' % layerName]
+            elif ltype == 'vect':
                 cmd = ['d.vect', 'map=%s' % layerName]
+            else:
+                gcmd.GError(parent = self,
+                            message = _("Unsupported map layer type <%s>.") % ltype)
+                return
+            
             newItem = maptree.AddLayer(ltype = dialog.GetLayerType(),
                                        lname = layerName,
                                        lchecked = False,



More information about the grass-commit mailing list