mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
[labeling] Fix broken repeat distance in map units (fix #11937)
This commit is contained in:
parent
c550af2ee3
commit
15ba006408
@ -2127,17 +2127,12 @@ void QgsPalLayerSettings::registerFeature( QgsFeature& f, const QgsRenderContext
|
||||
}
|
||||
}
|
||||
|
||||
if ( repeatDist != 0 )
|
||||
if ( !qgsDoubleNear( repeatDist, 0.0 ) )
|
||||
{
|
||||
if ( repeatdistinmapunit ) //convert distance from mm/map units to pixels
|
||||
if ( !repeatdistinmapunit )
|
||||
{
|
||||
repeatDist /= repeatDistanceMapUnitScale.computeMapUnitsPerPixel( context ) * context.scaleFactor();
|
||||
repeatDist *= mapUntsPerMM; //convert repeat distance from mm to map units
|
||||
}
|
||||
else //mm
|
||||
{
|
||||
repeatDist *= vectorScaleFactor;
|
||||
}
|
||||
repeatDist *= qAbs( ptOne.x() - ptZero.x() );
|
||||
}
|
||||
|
||||
// feature to the layer
|
||||
|
Loading…
x
Reference in New Issue
Block a user