[GRASS-SVN] r72371 - grass/trunk/gui/wxpython/datacatalog

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Mar 16 03:53:00 PDT 2018


Author: martinl
Date: 2018-03-16 03:53:00 -0700 (Fri, 16 Mar 2018)
New Revision: 72371

Modified:
   grass/trunk/gui/wxpython/datacatalog/tree.py
Log:
wxGUI/datacatalog: simplify g.remove caller

Modified: grass/trunk/gui/wxpython/datacatalog/tree.py
===================================================================
--- grass/trunk/gui/wxpython/datacatalog/tree.py	2018-03-16 10:48:37 UTC (rev 72370)
+++ grass/trunk/gui/wxpython/datacatalog/tree.py	2018-03-16 10:53:00 UTC (rev 72371)
@@ -792,15 +792,9 @@
                 title=_('Delete map')) == wx.ID_YES:
             label = _("Deleting {name}...").format(name=name)
             self.showNotification.emit(message=label)
-            if self.selected_type.label == 'vector':
-                removed, cmd = self._runCommand(
-                    'g.remove', flags='f', type='vector', name=name, env=env)
-            elif self.selected_type.label == 'raster':
-                removed, cmd = self._runCommand(
-                    'g.remove', flags='f', type='raster', name=name, env=env)
-            else:
-                removed, cmd = self._runCommand(
-                    'g.remove', flags='f', type='raster_3d', name=name, env=env)
+
+            removed, cmd = self._runCommand(
+                'g.remove', flags='f', type=self.selected_type.label, name=name, env=env)
             if removed == 0:
                 self._model.RemoveNode(self.selected_layer)
                 self.RefreshNode(self.selected_type, recursive=True)



More information about the grass-commit mailing list