Skip to content

Commit

Permalink
Fix waitForFinishedWithEventLoop() causing a freeze in composer
Browse files Browse the repository at this point in the history
Thanks Nyall for finding that out!
  • Loading branch information
wonder-sk committed Jun 16, 2014
1 parent 033bf6f commit bff7882
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/core/qgsmaprendererjob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,18 +238,10 @@ void QgsMapRendererCustomPainterJob::start()
QgsDebugMsg( "Rendering prepared in (seconds): " + QString( "%1" ).arg( prepareTime.elapsed() / 1000.0 ) );

// now we are ready to start rendering!
if ( !mLayerJobs.isEmpty() )
{
connect( &mFutureWatcher, SIGNAL( finished() ), SLOT( futureFinished() ) );
connect( &mFutureWatcher, SIGNAL( finished() ), SLOT( futureFinished() ) );

mFuture = QtConcurrent::run( staticRender, this );
mFutureWatcher.setFuture( mFuture );
}
else
{
// just make sure we will clean up and emit finished() signal
QTimer::singleShot( 0, this, SLOT( futureFinished() ) );
}
mFuture = QtConcurrent::run( staticRender, this );
mFutureWatcher.setFuture( mFuture );
}


Expand Down

0 comments on commit bff7882

Please sign in to comment.