Skip to content

Commit

Permalink
Merge pull request #2101 from mhugo/fix_cache_enabling
Browse files Browse the repository at this point in the history
Wait for the current rendering to finish before touching the cache
  • Loading branch information
wonder-sk committed Jun 19, 2015
2 parents 705eb74 + 72369fd commit 1d073da
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/gui/qgsmapcanvas.cpp
Expand Up @@ -554,6 +554,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 1d073da

Please sign in to comment.