Skip to content

Commit bff7882

Browse files
committed
Fix waitForFinishedWithEventLoop() causing a freeze in composer
Thanks Nyall for finding that out!
1 parent 033bf6f commit bff7882

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

src/core/qgsmaprendererjob.cpp

+3-11
Original file line numberDiff line numberDiff line change
@@ -238,18 +238,10 @@ void QgsMapRendererCustomPainterJob::start()
238238
QgsDebugMsg( "Rendering prepared in (seconds): " + QString( "%1" ).arg( prepareTime.elapsed() / 1000.0 ) );
239239

240240
// now we are ready to start rendering!
241-
if ( !mLayerJobs.isEmpty() )
242-
{
243-
connect( &mFutureWatcher, SIGNAL( finished() ), SLOT( futureFinished() ) );
241+
connect( &mFutureWatcher, SIGNAL( finished() ), SLOT( futureFinished() ) );
244242

245-
mFuture = QtConcurrent::run( staticRender, this );
246-
mFutureWatcher.setFuture( mFuture );
247-
}
248-
else
249-
{
250-
// just make sure we will clean up and emit finished() signal
251-
QTimer::singleShot( 0, this, SLOT( futureFinished() ) );
252-
}
243+
mFuture = QtConcurrent::run( staticRender, this );
244+
mFutureWatcher.setFuture( mFuture );
253245
}
254246

255247

0 commit comments

Comments
 (0)