Skip to content

Commit 1d073da

Browse files
committedJun 19, 2015
Merge pull request #2101 from mhugo/fix_cache_enabling
Wait for the current rendering to finish before touching the cache
2 parents 705eb74 + 72369fd commit 1d073da

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎src/gui/qgsmapcanvas.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,12 @@ void QgsMapCanvas::setCachingEnabled( bool enabled )
554554
if ( enabled == isCachingEnabled() )
555555
return;
556556

557+
if ( mJob && mJob->isActive() )
558+
{
559+
// wait for the current rendering to finish, before touching the cache
560+
mJob->waitForFinished();
561+
}
562+
557563
if ( enabled )
558564
{
559565
mCache = new QgsMapRendererCache;

0 commit comments

Comments
 (0)
Please sign in to comment.