Skip to content

Commit

Permalink
fix pin/unpin ctl key
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed May 29, 2016
1 parent 8e980cf commit 62c814c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/app/qgsmaptoolpinlabels.cpp
Expand Up @@ -239,8 +239,6 @@ void QgsMapToolPinLabels::pinUnpinLabels( const QgsRectangle& ext, QMouseEvent *
bool toggleUnpinOrPin = e->modifiers() & Qt::ControlModifier;

// get list of all drawn labels from all layers within, or touching, chosen extent
bool labelChanged = false;

const QgsLabelingResults* labelingResults = mCanvas->labelingResults();
if ( !labelingResults )
{
Expand All @@ -250,6 +248,7 @@ void QgsMapToolPinLabels::pinUnpinLabels( const QgsRectangle& ext, QMouseEvent *

QList<QgsLabelPosition> labelPosList = labelingResults->labelsWithinRect( ext );

bool labelChanged = false;
QList<QgsLabelPosition>::const_iterator it;
for ( it = labelPosList.constBegin() ; it != labelPosList.constEnd(); ++it )
{
Expand Down Expand Up @@ -284,7 +283,7 @@ void QgsMapToolPinLabels::pinUnpinLabels( const QgsRectangle& ext, QMouseEvent *
}
}
// pin label
if ( !isPinned() && ( !doUnpin || toggleUnpinOrPin ) )
else if ( !isPinned() && ( !doUnpin || toggleUnpinOrPin ) )
{
// pin label's location, and optionally rotation, to attribute table
if ( pinUnpinCurrentFeature( true ) )
Expand Down

0 comments on commit 62c814c

Please sign in to comment.