Skip to content
Permalink
Browse files

[labeling] Fix broken repeat distance in map units (fix #11937)

Cherry-picked from 15ba006
  • Loading branch information
nyalldawson committed Jun 24, 2015
1 parent 71b5a99 commit 5378f7366df23afc48ac2fa8038c349d63ab8ffd
Showing with 3 additions and 8 deletions.
  1. +3 −8 src/core/qgspallabeling.cpp
@@ -2175,17 +2175,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

0 comments on commit 5378f73

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