Navigation Menu

Skip to content

Commit

Permalink
Wait for the current rendering to finish before touching the cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugo Mercier authored and m-kuhn committed Jun 19, 2015
1 parent f4eca22 commit 2372351
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/gui/qgsmapcanvas.cpp
Expand Up @@ -555,6 +555,12 @@ void QgsMapCanvas::setCachingEnabled( bool enabled )
if ( enabled == isCachingEnabled() )
return;

if ( mJob && mJob->isActive() )
{
// wait for the current rendering to finish, before touching the cache
mJob->waitForFinished();
}

if ( enabled )
{
mCache = new QgsMapRendererCache;
Expand Down

0 comments on commit 2372351

Please sign in to comment.