Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 77c06b1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/gui/qgsmapcanvas.cpp
Expand Up @@ -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
Expand All @@ -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
Expand Down

2 comments on commit 77c06b1

@dakcarto
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dakcarto nope, I think it should be fine

Please sign in to comment.