Skip to content

Commit

Permalink
Do not draw a rubber band when label/diagram are not moveable
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Oct 22, 2018
1 parent b379d75 commit 1ab6d32
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/app/qgsmaptoolmovelabel.cpp
Expand Up @@ -57,13 +57,16 @@ void QgsMapToolMoveLabel::canvasPressEvent( QgsMapMouseEvent *e )

int xCol = -1, yCol = -1;

if ( !mCurrentLabel.pos.isDiagram && !labelMoveable( vlayer, mCurrentLabel.settings, xCol, yCol ) )
if ( !mCurrentLabel.pos.isDiagram && !labelMoveable( vlayer, mCurrentLabel.settings, xCol, yCol ) )
{
QgsPalIndexes indexes;

if ( createAuxiliaryFields( indexes ) )
return;

if ( !labelMoveable( vlayer, mCurrentLabel.settings, xCol, yCol ) )
return;

xCol = indexes[ QgsPalLayerSettings::PositionX ];
yCol = indexes[ QgsPalLayerSettings::PositionY ];
}
Expand All @@ -74,6 +77,9 @@ void QgsMapToolMoveLabel::canvasPressEvent( QgsMapMouseEvent *e )
if ( createAuxiliaryFields( indexes ) )
return;

if ( !diagramMoveable( vlayer, xCol, yCol ) )
return;

xCol = indexes[ QgsDiagramLayerSettings::PositionX ];
yCol = indexes[ QgsDiagramLayerSettings::PositionY ];
}
Expand Down

0 comments on commit 1ab6d32

Please sign in to comment.