Skip to content

Commit 72369fd

Browse files
author
Hugo Mercier
committed
Wait for the current rendering to finish before touching the cache
1 parent 4157b33 commit 72369fd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/gui/qgsmapcanvas.cpp

+6
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)