[GRASS-SVN] r71152 - grass/branches/releasebranch_7_2/gui/wxpython/lmgr
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue May 30 15:32:54 PDT 2017
Author: annakrat
Date: 2017-05-30 15:32:54 -0700 (Tue, 30 May 2017)
New Revision: 71152
Modified:
grass/branches/releasebranch_7_2/gui/wxpython/lmgr/giface.py
Log:
wxGUI/giface: AddLayer? should return layer, not None (merge from trunk, r70225)
Modified: grass/branches/releasebranch_7_2/gui/wxpython/lmgr/giface.py
===================================================================
--- grass/branches/releasebranch_7_2/gui/wxpython/lmgr/giface.py 2017-05-30 21:57:54 UTC (rev 71151)
+++ grass/branches/releasebranch_7_2/gui/wxpython/lmgr/giface.py 2017-05-30 22:32:54 UTC (rev 71152)
@@ -104,9 +104,10 @@
:param opacity: layer opacity level
:param cmd: command (given as a list)
"""
- self._tree.AddLayer(ltype=ltype, lname=name, lchecked=checked,
- lopacity=opacity, lcmd=cmd)
-
+ l = self._tree.AddLayer(ltype=ltype, lname=name, lchecked=checked,
+ lopacity=opacity, lcmd=cmd)
+ return Layer(l, self._tree.GetPyData(l))
+
def DeleteLayer(self, layer):
"""Remove layer from layer list"""
self._tree.Delete(layer._layer)
More information about the grass-commit
mailing list