Skip to content

Commit 5378f73

Browse files
committedJun 24, 2015
[labeling] Fix broken repeat distance in map units (fix #11937)
Cherry-picked from 15ba006
1 parent 71b5a99 commit 5378f73

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed
 

‎src/core/qgspallabeling.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2175,17 +2175,12 @@ void QgsPalLayerSettings::registerFeature( QgsFeature& f, const QgsRenderContext
21752175
}
21762176
}
21772177

2178-
if ( repeatDist != 0 )
2178+
if ( !qgsDoubleNear( repeatDist, 0.0 ) )
21792179
{
2180-
if ( repeatdistinmapunit ) //convert distance from mm/map units to pixels
2180+
if ( !repeatdistinmapunit )
21812181
{
2182-
repeatDist /= repeatDistanceMapUnitScale.computeMapUnitsPerPixel( context ) * context.scaleFactor();
2182+
repeatDist *= mapUntsPerMM; //convert repeat distance from mm to map units
21832183
}
2184-
else //mm
2185-
{
2186-
repeatDist *= vectorScaleFactor;
2187-
}
2188-
repeatDist *= qAbs( ptOne.x() - ptZero.x() );
21892184
}
21902185

21912186
// feature to the layer

0 commit comments

Comments
 (0)
Please sign in to comment.