Skip to content
Permalink
Browse files

Fix rendering regression

In parallel rendering, make sure mFinalImage exists before drawing
labels.
  • Loading branch information
mhugo committed Dec 16, 2019
1 parent 5d8899b commit d6ee3ed520fa1423c540619b5ca29a810ffda969
Showing with 19 additions and 1 deletion.
  1. +19 −1 src/core/qgsmaprendererparalleljob.cpp
@@ -228,6 +228,12 @@ void QgsMapRendererParallelJob::renderLayersFinished()
}
}

// compose final image for labeling
if ( mSecondPassLayerJobs.isEmpty() )
{
mFinalImage = composeImage( mSettings, mLayerJobs, mLabelJob );
}

QgsDebugMsgLevel( QStringLiteral( "PARALLEL layers finished" ), 2 );

if ( mSettings.testFlag( QgsMapSettings::DrawLabeling ) && !mLabelJob.context.renderingStopped() )
@@ -284,7 +290,19 @@ void QgsMapRendererParallelJob::renderingFinished()
}
else
{
renderLayersSecondPassFinished();
QgsDebugMsgLevel( QStringLiteral( "PARALLEL finished" ), 2 );

logRenderingTime( mLayerJobs, mSecondPassLayerJobs, mLabelJob );

cleanupJobs( mLayerJobs );

cleanupLabelJob( mLabelJob );

mStatus = Idle;

mRenderingTime = mRenderingStart.elapsed();

emit finished();
}
}

0 comments on commit d6ee3ed

Please sign in to comment.
You can’t perform that action at this time.