Skip to content

Commit bfa7714

Browse files
committedJul 29, 2016
Fix labeling using perimeter with repeating label distance set
If the visible part of a polygon is clipped and becomes a multipolygon, only one label is plotted on the wrong side of the polygon. Settings: Placement: Using Perimeter Allowed positions: Below line / Line orientation dependent position checked Repeat: 100 mm Fix #15341 (cherry-picked from c0b1684)
1 parent 5ebe9d1 commit bfa7714

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/core/qgspallabeling.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2517,7 +2517,8 @@ void QgsPalLayerSettings::registerFeature( QgsFeature& f, QgsRenderContext &cont
25172517
}
25182518

25192519
GEOSGeometry* geos_geom_clone;
2520-
if ( GEOSGeomTypeId_r( QgsGeometry::getGEOSHandler(), geos_geom ) == GEOS_POLYGON && repeatDistance > 0 && placement == Line )
2520+
GEOSGeomTypes geomType = (GEOSGeomTypes) GEOSGeomTypeId_r( QgsGeometry::getGEOSHandler(), geos_geom );
2521+
if ( (geomType == GEOS_POLYGON || geomType == GEOS_MULTIPOLYGON) && repeatDistance > 0 && placement == Line )
25212522
{
25222523
geos_geom_clone = GEOSBoundary_r( QgsGeometry::getGEOSHandler(), geos_geom );
25232524
}

0 commit comments

Comments
 (0)