On Wed, Aug 11, 2010 at 9:26 AM, Benoit de Cabissole <[email protected]> wrote:
>
> Something is still bothering me: what does happen if the raster is cached
> before I set the cache to None?
> I've tried the following code:
>
>  # - backup current cache state
>  bQI = theLayer.cacheImage()
>  if bQI != None: theLayer.setCacheImage( None )
>
>  ... refresh raster ...
>
>  # - restore the state of image cache
>  theLayer.setCacheImage( bQI )

The render cache works as follows: if there's a cached image and the
current extent has not changed, the cached image will be used. If the
cached image is not available (i.e. set to None), the layer will be
rendered again (and new cache image will be set). So with this code,
you would set the old cache image again - not something you want. All
you want is to remove the old cache image.

> It runs with no error, but on exit of QGIS it bombs out!

There was a small problem with python bindings (now fixed in r14053),
but again, there's no reason why you would want to do that.


Cheers
Martin
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to