Skip to content

Commit 15ba006

Browse files
committed
[labeling] Fix broken repeat distance in map units (fix #11937)
1 parent c550af2 commit 15ba006

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/core/qgspallabeling.cpp

+3-8
Original file line numberDiff line numberDiff line change
@@ -2127,17 +2127,12 @@ void QgsPalLayerSettings::registerFeature( QgsFeature& f, const QgsRenderContext
21272127
}
21282128
}
21292129

2130-
if ( repeatDist != 0 )
2130+
if ( !qgsDoubleNear( repeatDist, 0.0 ) )
21312131
{
2132-
if ( repeatdistinmapunit ) //convert distance from mm/map units to pixels
2132+
if ( !repeatdistinmapunit )
21332133
{
2134-
repeatDist /= repeatDistanceMapUnitScale.computeMapUnitsPerPixel( context ) * context.scaleFactor();
2134+
repeatDist *= mapUntsPerMM; //convert repeat distance from mm to map units
21352135
}
2136-
else //mm
2137-
{
2138-
repeatDist *= vectorScaleFactor;
2139-
}
2140-
repeatDist *= qAbs( ptOne.x() - ptZero.x() );
21412136
}
21422137

21432138
// feature to the layer

0 commit comments

Comments
 (0)