Skip to content
Permalink
Browse files

Cancel preview jobs without blocking

Makes for more reponsive map updates
  • Loading branch information
nyalldawson committed Jul 14, 2017
1 parent d0fd38f commit 306c5b33b2501e879054f2ce95c0b8ba67bb8ea0
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/gui/qgsmapcanvas.cpp
@@ -2171,9 +2171,10 @@ void QgsMapCanvas::stopPreviewJobs()
{
if ( *it )
{
( *it )->cancel();
disconnect( *it, &QgsMapRendererJob::finished, this, &QgsMapCanvas::previewJobFinished );
connect( *it, &QgsMapRendererQImageJob::finished, *it, &QgsMapRendererQImageJob::deleteLater );
( *it )->cancelWithoutBlocking();
}
delete ( *it );
}
mPreviewJobs.clear();
}

0 comments on commit 306c5b3

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