[Qgis-developer] refresh postgis layer
Martin Dobias
wonder.sk at gmail.com
Thu Feb 12 08:42:24 PST 2015
Hi Remi
On Thu, Feb 12, 2015 at 11:27 PM, Rémi Cura <remi.cura at gmail.com> wrote:
> Hello dear list,
>
> in the process of developing a plugin (python 2.7, QGIS 2.6),
>
> from pyqgis ,
> we would like to refresh a Postgis layer.
> When using the vectorLayer.refresh(), it does nothing.
>
Try vectorLayer.triggerRepaint()
Calling refresh() of the canvas will not work because even though the
canvas will get refreshed, it will use previously cached map images. With
triggerRepaint() the cached map image of your layer will get cleared and
also refresh() will be called for any canvas that displays such layer.
Regards
Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150212/ee4eb5bc/attachment.html>
More information about the Qgis-developer
mailing list