[prev in list] [next in list] [prev in thread] [next in thread] 

List:       grass-commit
Subject:    [GRASS-SVN] r49025 - grass/trunk/gui/wxpython
From:       svn_grass () osgeo ! org
Date:       2011-10-31 16:31:09
Message-ID: 20111031163109.B201B390304 () trac ! osgeo ! org
[Download RAW message or body]

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,

_______________________________________________
grass-commit mailing list
grass-commit@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-commit
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic