[GRASS-SVN] r49033 - grass/branches/develbranch_6/gui/wxpython

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Nov 1 07:02:41 EDT 2011


Author: martinl
Date: 2011-11-01 04:02:41 -0700 (Tue, 01 Nov 2011)
New Revision: 49033

Modified:
   grass/branches/develbranch_6/gui/wxpython/wxgui.py
Log:
wxGUI/add maps: fix ltype


Modified: grass/branches/develbranch_6/gui/wxpython/wxgui.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/wxgui.py	2011-11-01 09:42:44 UTC (rev 49032)
+++ grass/branches/develbranch_6/gui/wxpython/wxgui.py	2011-11-01 11:02:41 UTC (rev 49033)
@@ -1335,7 +1335,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()
@@ -1346,16 +1346,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