Skip to content
Permalink
Browse files

[rotated_ticks] add a tolerance for skip low angled ticks parameter

  • Loading branch information
olivierdalang authored and nyalldawson committed Sep 13, 2020
1 parent a53dae2 commit ca873438b2a31eafd2b79a1821dee5dd3040a532
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/layout/qgslayoutitemmapgrid.cpp
@@ -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
@@ -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 );

0 comments on commit ca87343

Please sign in to comment.
You can’t perform that action at this time.