Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Do not draw a rubber band when label/diagram are not moveable
- Loading branch information
Showing
with
7 additions
and
1 deletion.
-
+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 ]; |
|
|
} |
|
|