[GRASS-SVN] r72370 - grass/trunk/gui/wxpython/datacatalog
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Mar 16 03:48:37 PDT 2018
Author: martinl
Date: 2018-03-16 03:48:37 -0700 (Fri, 16 Mar 2018)
New Revision: 72370
Modified:
grass/trunk/gui/wxpython/datacatalog/catalog.py
grass/trunk/gui/wxpython/datacatalog/frame.py
grass/trunk/gui/wxpython/datacatalog/tree.py
Log:
wxGUI/datacatalog: display layer on double click
Modified: grass/trunk/gui/wxpython/datacatalog/catalog.py
===================================================================
--- grass/trunk/gui/wxpython/datacatalog/catalog.py 2018-03-16 07:21:08 UTC (rev 72369)
+++ grass/trunk/gui/wxpython/datacatalog/catalog.py 2018-03-16 10:48:37 UTC (rev 72370)
@@ -6,7 +6,7 @@
Classes:
- datacatalog::DataCatalog
-(C) 2014 by Tereza Fiedlerova, and the GRASS Development Team
+(C) 2014-2018 by Tereza Fiedlerova, and the GRASS Development Team
This program is free software under the GNU General Public
License (>=v2). Read the file COPYING that comes with GRASS
Modified: grass/trunk/gui/wxpython/datacatalog/frame.py
===================================================================
--- grass/trunk/gui/wxpython/datacatalog/frame.py 2018-03-16 07:21:08 UTC (rev 72369)
+++ grass/trunk/gui/wxpython/datacatalog/frame.py 2018-03-16 10:48:37 UTC (rev 72370)
@@ -6,7 +6,7 @@
Classes:
- datacatalog::DataCatalogFrame
-(C) 2014-2016 by Tereza Fiedlerova, and the GRASS Development Team
+(C) 2014-2018 by Tereza Fiedlerova, and the GRASS Development Team
This program is free software under the GNU General Public
License (>=v2). Read the file COPYING that comes with GRASS
Modified: grass/trunk/gui/wxpython/datacatalog/tree.py
===================================================================
--- grass/trunk/gui/wxpython/datacatalog/tree.py 2018-03-16 07:21:08 UTC (rev 72369)
+++ grass/trunk/gui/wxpython/datacatalog/tree.py 2018-03-16 10:48:37 UTC (rev 72370)
@@ -7,7 +7,7 @@
- datacatalog::LocationMapTree
- datacatalog::DataCatalogTree
-(C) 2014-2015 by Tereza Fiedlerova, and the GRASS Development Team
+(C) 2014-2018 by Tereza Fiedlerova, and the GRASS Development Team
This program is free software under the GNU General Public
License (>=v2). Read the file COPYING that comes with GRASS
@@ -471,7 +471,18 @@
self._popupMenuElement()
def OnDoubleClick(self, node):
- """Expand/Collapse node."""
+ """Double click on item/node.
+
+ Display selected layer if node is a map layer otherwise
+ expand/collapse node.
+ """
+ self.DefineItems(node)
+ if self.selected_layer:
+ # display selected layer and return
+ self.DisplayLayer()
+ return
+
+ # expand/collapse location/mapset...
if self.IsNodeExpanded(node):
self.CollapseNode(node, recursive=False)
else:
@@ -796,10 +807,15 @@
Debug.msg(1, "LAYER " + name + " DELETED")
self.showNotification.emit(
message=_("g.remove completed").format(cmd=cmd))
+
gscript.try_remove(gisrc)
def OnDisplayLayer(self, event):
"""Display layer in current graphics view"""
+ self.DisplayLayer()
+
+ def DisplayLayer(self):
+ """Display selected layer in current graphics view"""
layerName = []
if self.selected_location.label == gisenv(
)['LOCATION_NAME'] and self.selected_mapset:
More information about the grass-commit
mailing list