Skip to content

Commit

Permalink
Rebase to master
Browse files Browse the repository at this point in the history
  • Loading branch information
domi4484 committed Jan 10, 2022
1 parent 028eaf8 commit 52e2c25
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
2 changes: 2 additions & 0 deletions src/app/labeling/qgsmaptoollabel.h
Expand Up @@ -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 );
Expand Down
20 changes: 10 additions & 10 deletions src/app/labeling/qgsmaptoolmovelabel.cpp
Expand Up @@ -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
Expand Down

0 comments on commit 52e2c25

Please sign in to comment.