Skip to content

Commit

Permalink
Cancel preview jobs without blocking
Browse files Browse the repository at this point in the history
Makes for more reponsive map updates
  • Loading branch information
nyalldawson committed Jul 14, 2017
1 parent d0fd38f commit 306c5b3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/gui/qgsmapcanvas.cpp
Expand Up @@ -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.