Skip to content
Permalink
Browse files

fix pin/unpin ctl key

  • Loading branch information
pblottiere committed May 29, 2016
1 parent 8e980cf commit 62c814cb4556ad809abf4c23f0db508c27a2ff61
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/app/qgsmaptoolpinlabels.cpp
@@ -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 )
{
@@ -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 )
{
@@ -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 ) )

0 comments on commit 62c814c

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