[Qgis-developer] iface.activeLayer() strange behavior when no layers are selected in the layers tree
Alessandro Pasotti
apasotti at gmail.com
Tue Jul 7 07:48:32 PDT 2015
Hi,
today some users showed me something confusing:
A1. start QGIS loading the last opened project
A2. no active layers in the layers tree
A3. iface.activeLayer() returns None (so far so good)
B1. start QGIS loading the last opened project
B2. click on a layer in the layers tree
B3. iface.activeLayer() return the layer (so far so good)
B4. CTRL+CLICK on the selected layer
B5. apparently no layer are selected in the layers tree at this point
B6. iface.activeLayer() return the previously selected layer
What sound confusing to the users that pointed me to this behavior is that
in A1 and B5 the GUI looks exactly the same (no layers are selected in the
layers tree) but in B5 iface returns a layer while in A1 it doesn't.
Should I file a ticket?
--
Alessandro Pasotti
w3: www.itopen.it
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150707/2d2d3f59/attachment.html>
More information about the Qgis-developer
mailing list