[Qgis-developer] refresh one layer

Martin Dobias wonder.sk at gmail.com
Fri Jan 22 04:55:42 EST 2010


On Wed, Jan 20, 2010 at 5:00 PM, Michele Mammini <mamminim at yahoo.it> wrote:
> Dear all,
>
> i'd like to know if it is possible to refresh one single layer of my Map.
> Actually i'm using the refresh function of QgsMapCanvas, but in this way the
> system refresh all the layers and the system become slowly

It's kind of possible. From 1.4 release there's support for caching of
rendered layers (turned off by default). You can turn it on in options
dialog. Then always make sure to erase cache for the layer that has
been changed (layer.setCacheImage(None)). It will get rendered again,
while the rest of the layers should stay untouched (their cache image
will be displayed).

Martin


More information about the Qgis-developer mailing list