Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson authored Sep 17, 2021
1 parent 3761ed3 commit c0a9b04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/pal/feature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ void createCandidateAtOrderedPositionOverPoint( double &labelX, double &labelY,
// Take care of the label angle when creating candidates. See pr comments #44944 for details
// https://github.com/qgis/QGIS/pull/44944#issuecomment-914670088
QTransform transformRotation;
transformRotation.rotate( angle * QgsUnitTypes::fromUnitToUnitFactor( QgsUnitTypes::AngleRadians, QgsUnitTypes::AngleDegrees ) );
transformRotation.rotate( angle * 180 / M_PI );
transformRotation.map( deltaX, deltaY, &deltaX, &deltaY );

//have bearing, distance - calculate reference point
Expand Down Expand Up @@ -691,7 +691,7 @@ std::size_t FeaturePart::createCandidatesAroundPoint( double x, double y, std::v
// Take care of the label angle when creating candidates. See pr comments #44944 for details
// https://github.com/qgis/QGIS/pull/44944#issuecomment-914670088
QTransform transformRotation;
transformRotation.rotate( angle * QgsUnitTypes::fromUnitToUnitFactor( QgsUnitTypes::AngleRadians, QgsUnitTypes::AngleDegrees ) );
transformRotation.rotate( angle * 180 / M_PI );
transformRotation.map( deltaX, deltaY, &deltaX, &deltaY );

double labelX = x + deltaX;
Expand Down

0 comments on commit c0a9b04

Please sign in to comment.