[Qgis-developer] currentLayerChanged() SIGNAL on right click in interface Legend

Alexandre Neto senhor.neto at gmail.com
Sat Aug 24 12:24:41 PDT 2013


Hi Larry,

Thanks for the fast answer. You were right, testing in the console I got
the same results as you. Clicking in a white space send the currentLayerChanged
signal also in linux.

So I have double checked my code and... it was my bad, Sorry. I found a bug
in my code, that was not running when currentLayer == None.

Regards,

Alexandre Neto


On Sat, Aug 24, 2013 at 5:03 PM, Larry Shaffer <larrys at dakotacarto.com>wrote:

> Hi Alexandre,
>
> On Sat, Aug 24, 2013 at 8:23 AM, Alexandre Neto <senhor.neto at gmail.com>wrote:
>
>> Hi,
>>
>> After right or left clicking the interface legend in an empty space,
>>
>> iface.mapCanvas.currentLayer() == None
>>
>> Shouldn't currentLayerChanged() signal be thrown? It does not seem to.
>>
>
> I can not verify the same behavior on Mac. As far as I can tell, it is
> working like that already. In console:
>
> def print_active_layer(layer):
>     print layer
>
> iface.currentLayerChanged["QgsMapLayer *"].connect(print_active_layer)
>
> Changing the active layer, including clicking in empty space emits the
> signal.
>
> A while back, I made several changes that separated the visual feedback
> between active layer and current selection. For example, you can have no
> selection and still have an active layer. This is important to how
> selections should function and is more inline with other GUIs. Active
> layers are now represented with an underlined layer name.
>
> For example, clicking on a symbology row, under a layer, will clear the
> selection (but not the active layer), and clicking empty space with clear
> both the selection and active layer.
>
> Regards,
>
> Larry
>
>
>
>> Thanks,
>>
>> Alexandre Neto
>>
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20130824/dde69046/attachment.html>


More information about the Qgis-developer mailing list