<div dir="ltr"><div><div>I have code for a python plugin (<a href="https://plugins.qgis.org/plugins/TomBio/">https://plugins.qgis.org/plugins/TomBio/</a>) that follows this pattern:<br><br>* display vector layer A in map canvas<br>* use the canvas saveAsImage method to save map image<br>* hide vector layer A from map canvas<br>* display vector layer B in map canvas<br>* use the canvas saveAsImage method to save map image<br>* hide vector layer B from map canvas<br><br>This works very well in QGIS 2.0.1 - it can rapidly generate hundreds of map images. But I updated to 2.6 and it no longer works. All the map images are created without the vector layers being visible. It seems like the layers are only actually rendered at the end of the process. I tried using the canvas refresh method in the loop, but it made no difference.<br><br>I also compared the behaviour of the MMQGIS plugin's animation tools, 
which work in a similar way, and they have the same problem - i.e. they 
don't work with QGIS 2.6.<br><br></div>I just joined the developer list and looking back over some previous posts and doing some background reading here - <a href="http://www.lutraconsulting.co.uk/products/qgis-mtr/">http://www.lutraconsulting.co.uk/products/qgis-mtr/</a> - it seems as though the introduction of multi-threaded rendering (MTR) may be responsible.<br><br></div>Is there any way I can work with the new rendering system to get this pattern working in recent versions of QGIS?<br></div>