[GRASS-SVN] r70225 - grass/trunk/gui/wxpython/lmgr
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Jan 3 11:48:58 PST 2017
Author: annakrat
Date: 2017-01-03 11:48:58 -0800 (Tue, 03 Jan 2017)
New Revision: 70225
Modified:
grass/trunk/gui/wxpython/lmgr/giface.py
Log:
wxGUI/giface: AddLayer should return layer, not None
Modified: grass/trunk/gui/wxpython/lmgr/giface.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/giface.py 2017-01-03 19:44:38 UTC (rev 70224)
+++ grass/trunk/gui/wxpython/lmgr/giface.py 2017-01-03 19:48:58 UTC (rev 70225)
@@ -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