Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fixes freeze of server during rendering
- Loading branch information
Showing
with
7 additions
and
0 deletions.
-
+7
−0
src/server/services/wms/qgsmaprendererjobproxy.cpp
|
@@ -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 ) ); |
|
|