mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Fix waitForFinishedWithEventLoop() causing a freeze in composer
Thanks Nyall for finding that out!
This commit is contained in:
parent
033bf6f6cc
commit
bff7882cf6
@ -238,19 +238,11 @@ void QgsMapRendererCustomPainterJob::start()
|
|||||||
QgsDebugMsg( "Rendering prepared in (seconds): " + QString( "%1" ).arg( prepareTime.elapsed() / 1000.0 ) );
|
QgsDebugMsg( "Rendering prepared in (seconds): " + QString( "%1" ).arg( prepareTime.elapsed() / 1000.0 ) );
|
||||||
|
|
||||||
// now we are ready to start rendering!
|
// 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 );
|
mFuture = QtConcurrent::run( staticRender, this );
|
||||||
mFutureWatcher.setFuture( mFuture );
|
mFutureWatcher.setFuture( mFuture );
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
// just make sure we will clean up and emit finished() signal
|
|
||||||
QTimer::singleShot( 0, this, SLOT( futureFinished() ) );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void QgsMapRendererCustomPainterJob::cancel()
|
void QgsMapRendererCustomPainterJob::cancel()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user