[GRASS-SVN] r70011 - grass/trunk/gui/wxpython/vdigit

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Dec 5 20:46:14 PST 2016


Author: annakrat
Date: 2016-12-05 20:46:14 -0800 (Mon, 05 Dec 2016)
New Revision: 70011

Modified:
   grass/trunk/gui/wxpython/vdigit/toolbars.py
Log:
g.gui.vdigit: fix error when creating a new vector in standalone digitizer

Modified: grass/trunk/gui/wxpython/vdigit/toolbars.py
===================================================================
--- grass/trunk/gui/wxpython/vdigit/toolbars.py	2016-12-05 21:46:24 UTC (rev 70010)
+++ grass/trunk/gui/wxpython/vdigit/toolbars.py	2016-12-06 04:46:14 UTC (rev 70011)
@@ -817,15 +817,14 @@
                                   disableAdd=True)
 
             if dlg and dlg.GetName():
-                # add layer to map layer tree
-                if self._giface.GetLayerTree():
-                    mapName = dlg.GetName() + '@' + grass.gisenv()['MAPSET']
-                    self._giface.GetLayerList().AddLayer(
+                # add layer to map layer tree/map display
+                mapName = dlg.GetName() + '@' + grass.gisenv()['MAPSET']
+                self._giface.GetLayerList().AddLayer(
                         ltype='vector', name=mapName, checked=True,
                         cmd=['d.vect', 'map=%s' % mapName])
 
-                    vectLayers = self.UpdateListOfLayers(updateTool=True)
-                    selection = vectLayers.index(mapName)
+                vectLayers = self.UpdateListOfLayers(updateTool=True)
+                selection = vectLayers.index(mapName)
 
                 # create table ?
                 if dlg.IsChecked('table'):



More information about the grass-commit mailing list