mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
Fixes freeze of server during rendering
This commit is contained in:
parent
b379d75e1f
commit
514db35cf8
@ -56,6 +56,13 @@ namespace QgsWms
|
||||
renderJob.setFeatureFilterProvider( mFeatureFilterProvider );
|
||||
#endif
|
||||
renderJob.start();
|
||||
|
||||
// Allows the main thread to manage blocking call coming from rendering
|
||||
// threads (see discussion in #18988).
|
||||
QEventLoop loop;
|
||||
QObject::connect( &renderJob, &QgsMapRendererParallelJob::finished, &loop, &QEventLoop::quit );
|
||||
loop.exec();
|
||||
|
||||
renderJob.waitForFinished();
|
||||
*image = renderJob.renderedImage();
|
||||
mPainter.reset( new QPainter( image ) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user