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

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Nov 1 07:05:33 EDT 2011


Author: martinl
Date: 2011-11-01 04:05:32 -0700 (Tue, 01 Nov 2011)
New Revision: 49034

Modified:
   grass/trunk/gui/wxpython/wxgui.py
Log:
wxGUI/add maps: fix ltype
	  (merge r49033 from devbr6)


Modified: grass/trunk/gui/wxpython/wxgui.py
===================================================================
--- grass/trunk/gui/wxpython/wxgui.py	2011-11-01 11:02:41 UTC (rev 49033)
+++ grass/trunk/gui/wxpython/wxgui.py	2011-11-01 11:05:32 UTC (rev 49034)
@@ -1347,7 +1347,7 @@
         if dialog.ShowModal() != wx.ID_OK:
             dialog.Destroy()
             return
-
+        
         # start new map display if no display is available
         if not self.curr_page:
             self.NewDisplay()
@@ -1358,16 +1358,19 @@
             ltype = dialog.GetLayerType(cmd = True)
             if ltype == 'rast':
                 cmd = ['d.rast', 'map=%s' % layerName]
+                wxType = 'raster'
             elif ltype == 'rast3d':
                 cmd = ['d.rast3d', 'map=%s' % layerName]
+                wxType = '3d-raster'
             elif ltype == 'vect':
                 cmd = ['d.vect', 'map=%s' % layerName]
+                wxType = 'vector'
             else:
                 gcmd.GError(parent = self,
                             message = _("Unsupported map layer type <%s>.") % ltype)
                 return
             
-            newItem = maptree.AddLayer(ltype = dialog.GetLayerType(),
+            newItem = maptree.AddLayer(ltype = wxType,
                                        lname = layerName,
                                        lchecked = False,
                                        lopacity = 1.0,



More information about the grass-commit mailing list