We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e6718b6 commit 79130b3Copy full SHA for 79130b3
src/plugins/point_displacement_renderer/qgspointdisplacementrenderer.cpp
@@ -479,6 +479,17 @@ void QgsPointDisplacementRenderer::calculateSymbolAndLabelPositions( const QPoin
479
symbolPositions.clear();
480
labelShifts.clear();
481
482
+ if ( nPosition < 1 )
483
+ {
484
+ return;
485
+ }
486
+ else if ( nPosition == 1 ) //If there is only one feature, draw it exactly at the center position
487
488
+ symbolPositions.append( centerPoint );
489
+ labelShifts.append( QPointF( symbolDiagonal / 2.0, -symbolDiagonal / 2.0 ) );
490
491
492
+
493
double fullPerimeter = 2 * M_PI;
494
double angleStep = fullPerimeter / nPosition;
495
double currentAngle;
0 commit comments