Skip to content

Commit 77c06b1

Browse files
committed
Fix pinned labels highlight updating by taking labeling results prior to render completion signal
1 parent 81039ca commit 77c06b1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/gui/qgsmapcanvas.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,11 @@ void QgsMapCanvas::rendererJobFinished()
708708

709709
if ( !mJobCancelled )
710710
{
711+
// take labeling results before emitting renderComplete, so labeling map tools
712+
// connected to signal work with correct results
713+
delete mLabelingResults;
714+
mLabelingResults = mJob->takeLabelingResults();
715+
711716
QImage img = mJob->renderedImage();
712717

713718
// emit renderComplete to get our decorations drawn
@@ -733,9 +738,6 @@ void QgsMapCanvas::rendererJobFinished()
733738
p.end();
734739

735740
mMap->setContent( img, mSettings.visibleExtent() );
736-
737-
delete mLabelingResults;
738-
mLabelingResults = mJob->takeLabelingResults();
739741
}
740742

741743
// now we are in a slot called from mJob - do not delete it immediately

0 commit comments

Comments
 (0)