[GRASS-SVN] r72372 - grass/trunk/gui/wxpython/datacatalog
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Mar 16 03:58:40 PDT 2018
Author: martinl
Date: 2018-03-16 03:58:40 -0700 (Fri, 16 Mar 2018)
New Revision: 72372
Modified:
grass/trunk/gui/wxpython/datacatalog/tree.py
Log:
wxGUI/datacatalog: remove map layer from layer tree on delete map
Modified: grass/trunk/gui/wxpython/datacatalog/tree.py
===================================================================
--- grass/trunk/gui/wxpython/datacatalog/tree.py 2018-03-16 10:53:00 UTC (rev 72371)
+++ grass/trunk/gui/wxpython/datacatalog/tree.py 2018-03-16 10:58:40 UTC (rev 72372)
@@ -802,6 +802,13 @@
self.showNotification.emit(
message=_("g.remove completed").format(cmd=cmd))
+ # remove map layer from layer tree if exists
+ if not isinstance(self._giface, StandaloneGrassInterface):
+ name = self.selected_layer.label + '@' + self.selected_mapset.label
+ layers = self._giface.GetLayerList().GetLayersByName(name)
+ for layer in layers:
+ self._giface.GetLayerList().DeleteLayer(layer)
+
gscript.try_remove(gisrc)
def OnDisplayLayer(self, event):
More information about the grass-commit
mailing list