Skip to content
Permalink
Browse files
Rebase to master
  • Loading branch information
domi4484 committed Jan 10, 2022
1 parent 028eaf8 commit 52e2c25e4ab76d6f74b96ebb4bbca427327efcdf
Showing with 12 additions and 10 deletions.
  1. +2 −0 src/app/labeling/qgsmaptoollabel.h
  2. +10 −10 src/app/labeling/qgsmaptoolmovelabel.cpp
@@ -212,6 +212,8 @@ class APP_EXPORT QgsMapToolLabel: public QgsMapToolAdvancedDigitizing
*/
bool isPinned();

bool labelMoveable( QgsVectorLayer *vlayer, const QgsPalLayerSettings &settings, int &xCol, int &yCol, int &pointCol ) const;

bool createAuxiliaryFields( QgsPalIndexes &palIndexes );
bool createAuxiliaryFields( LabelDetails &details, QgsPalIndexes &palIndexes ) const;
bool createAuxiliaryFields( QgsDiagramIndexes &diagIndexes );
@@ -243,18 +243,18 @@ void QgsMapToolMoveLabel::cadCanvasPressEvent( QgsMapMouseEvent *e )
return;
}
}
}

mStartPointMapCoords = e->mapPoint();
QgsPointXY referencePoint;
if ( !currentLabelRotationPoint( referencePoint, !currentLabelPreserveRotation() ) )
{
referencePoint.setX( mCurrentLabel.pos.labelRect.xMinimum() );
referencePoint.setY( mCurrentLabel.pos.labelRect.yMinimum() );
}
mClickOffsetX = mStartPointMapCoords.x() - referencePoint.x();
mClickOffsetY = mStartPointMapCoords.y() - referencePoint.y();
createRubberBands();
mStartPointMapCoords = e->mapPoint();
QgsPointXY referencePoint;
if ( !currentLabelRotationPoint( referencePoint, !currentLabelPreserveRotation() ) )
{
referencePoint.setX( mCurrentLabel.pos.labelRect.xMinimum() );
referencePoint.setY( mCurrentLabel.pos.labelRect.yMinimum() );
}
mClickOffsetX = mStartPointMapCoords.x() - referencePoint.x();
mClickOffsetY = mStartPointMapCoords.y() - referencePoint.y();
createRubberBands();
}
}
else

0 comments on commit 52e2c25

Please sign in to comment.