Skip to content
Permalink
Browse files

Fix shift in point displacement renderer

  • Loading branch information
mhugent committed Oct 10, 2011
1 parent f075f7e commit 0e99d431c03b55b60dffaa5a3b8d30ca82bdd465
Showing with 11 additions and 0 deletions.
  1. +11 −0 src/plugins/point_displacement_renderer/qgspointdisplacementrenderer.cpp
@@ -481,6 +481,17 @@ void QgsPointDisplacementRenderer::calculateSymbolAndLabelPositions( const QPoin
symbolPositions.clear();
labelShifts.clear();

if ( nPosition < 1 )
{
return;
}
else if ( nPosition == 1 ) //If there is only one feature, draw it exactly at the center position
{
symbolPositions.append( centerPoint );
labelShifts.append( QPointF( symbolDiagonal / 2.0, -symbolDiagonal / 2.0 ) );
return;
}

double fullPerimeter = 2 * M_PI;
double angleStep = fullPerimeter / nPosition;
double currentAngle;

0 comments on commit 0e99d43

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