Skip to content
Permalink
Browse files

Fix pinned labels highlight updating by taking labeling results prior…

… to render completion signal
  • Loading branch information
dakcarto committed Mar 12, 2014
1 parent 81039ca commit 77c06b1d7e37af729e0d53410a6f36976a127243
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/gui/qgsmapcanvas.cpp
@@ -708,6 +708,11 @@ void QgsMapCanvas::rendererJobFinished()

if ( !mJobCancelled )
{
// take labeling results before emitting renderComplete, so labeling map tools
// connected to signal work with correct results
delete mLabelingResults;
mLabelingResults = mJob->takeLabelingResults();

QImage img = mJob->renderedImage();

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

mMap->setContent( img, mSettings.visibleExtent() );

delete mLabelingResults;
mLabelingResults = mJob->takeLabelingResults();
}

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

2 comments on commit 77c06b1

@dakcarto

This comment has been minimized.

Copy link
Member Author

@dakcarto dakcarto replied Mar 12, 2014

@wonder-sk Can you think of any reason why moving the taking of labeling results before emit renderComplete is not a good idea?

@wonder-sk

This comment has been minimized.

Copy link
Member

@wonder-sk wonder-sk replied Mar 17, 2014

@dakcarto nope, I think it should be fine

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