Skip to content

Commit 8f70664

Browse files
nirvnSandro Santilli
authored and
Sandro Santilli
committed
[rotation] prevent rotation of labels when placed around or over a point/centroid
1 parent 7245bf8 commit 8f70664

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/core/qgspallabeling.cpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -4139,7 +4139,9 @@ void QgsPalLabeling::drawLabelCandidateRect( pal::LabelPosition* lp, QPainter* p
41394139
if ( rotation )
41404140
{
41414141
// Only if not horizontal
4142-
if ( lp->getFeaturePart()->getLayer()->getArrangement() != P_HORIZ )
4142+
if ( lp->getFeaturePart()->getLayer()->getArrangement() != P_POINT &&
4143+
lp->getFeaturePart()->getLayer()->getArrangement() != P_POINT_OVER &&
4144+
lp->getFeaturePart()->getLayer()->getArrangement() != P_HORIZ )
41434145
{
41444146
painter->rotate( rotation );
41454147
}
@@ -4303,7 +4305,9 @@ void QgsPalLabeling::drawLabel( pal::LabelPosition* label, QgsRenderContext& con
43034305
if ( rotation )
43044306
{
43054307
// Only if not horizontal
4306-
if ( lp->getFeaturePart()->getLayer()->getArrangement() != P_HORIZ )
4308+
if ( lp->getFeaturePart()->getLayer()->getArrangement() != P_POINT &&
4309+
lp->getFeaturePart()->getLayer()->getArrangement() != P_POINT_OVER &&
4310+
lp->getFeaturePart()->getLayer()->getArrangement() != P_HORIZ )
43074311
{
43084312
painter->rotate( rotation );
43094313
}

0 commit comments

Comments
 (0)