Skip to content
Permalink
Browse files

Do not draw a rubber band when label/diagram are not moveable

  • Loading branch information
pblottiere committed Oct 22, 2018
1 parent b379d75 commit 1ab6d323b04a65e551f117f02cc0b99473494a3b
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/app/qgsmaptoolmovelabel.cpp
@@ -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 ];
}
@@ -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 ];
}

0 comments on commit 1ab6d32

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