Bug report #10900

Updated by Matthias Kuhn about 7 years ago

Good morning,



trying to filter the entries of a "Value relation" with the extent of the current map canvas, I get a empty list of values.



The same expression used to update a column of the table works fine...



Here is the expression I use :



<pre>

intersects( $geometry , geomFromWKT( $current_canvas_extent ))

</pre>



and here is the function providing $current_canvas_extent :

<pre>

from qgis.utils import qgsfunction

from qgis.utils import iface



@qgsfunction(0, "Python")

def current_canvas_extent(values, feature, parent):

"""

retourne l etendue courante de la carte

"""

extend = iface.mapCanvas().extent().asWktPolygon()

return extend

</pre>



It woks fine on 2.2



Thanks a lot,



Mathieu Bossaert

Back