[symbology] Fix point pattern displacement logic to match pre 3.8

This commit is contained in:
nirvn 2019-05-27 15:17:37 +07:00
parent d7fa0286c4
commit 21940e1dfb

View File

@ -3233,7 +3233,7 @@ void QgsPointPatternFillSymbolLayer::applyPattern( const QgsSymbolRenderContext
{
for ( double currentY = -height; currentY <= height * 2.0; currentY += height / 2.0 )
{
mMarkerSymbol->renderPoint( QPointF( currentX + widthOffset, currentY + heightOffset - displacementPixelY ), context.feature(), pointRenderContext );
mMarkerSymbol->renderPoint( QPointF( currentX + widthOffset + ( std::fmod( currentY, height ) != 0 ? displacementPixelX : 0 ), currentY + heightOffset - displacementPixelY ), context.feature(), pointRenderContext );
}
}