Skip to content

Commit

Permalink
[rotated_ticks] add a tolerance for skip low angled ticks parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierdalang authored and nyalldawson committed Sep 13, 2020
1 parent a53dae2 commit ca87343
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/layout/qgslayoutitemmapgrid.cpp
Expand Up @@ -1017,7 +1017,7 @@ void QgsLayoutItemMapGrid::drawGridFrameTicks( QPainter *p, GridExtension *exten
continue;

// If the angle is below the threshold, we don't draw the annotation
if ( abs( annot.angle ) / M_PI * 180.0 > 90.0 - mRotatedTicksMinimumAngle )
if ( abs( annot.angle ) / M_PI * 180.0 > 90.0 - mRotatedTicksMinimumAngle + 0.0001 )
continue;

// Skip outwards facing annotations that are below mRotatedTicksMarginToCorner
Expand Down Expand Up @@ -1216,7 +1216,7 @@ void QgsLayoutItemMapGrid::drawCoordinateAnnotation( QgsRenderContext &context,
AnnotationDirection anotDir = annotationDirection( frameBorder );

// If the angle is below the threshold, we don't draw the annotation
if ( abs( annot.angle ) / M_PI * 180.0 > 90.0 - mRotatedAnnotationsMinimumAngle )
if ( abs( annot.angle ) / M_PI * 180.0 > 90.0 - mRotatedAnnotationsMinimumAngle + 0.0001 )
return;

QVector2D normalVector = borderToNormal2D( annot.border );
Expand Down

0 comments on commit ca87343

Please sign in to comment.