Skip to content
Permalink
Browse files

Merge pull request #2101 from mhugo/fix_cache_enabling

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 1d073da72ae35903a2015ba8e8c896a5d22f2ebe
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/gui/qgsmapcanvas.cpp
@@ -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;

0 comments on commit 1d073da

Please sign in to comment.
You can’t perform that action at this time.