Skip to content

Commit

Permalink
Fix labeling using perimeter with repeating label distance set
Browse files Browse the repository at this point in the history
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
  • Loading branch information
fritsvanveen authored and nyalldawson committed Jul 27, 2016
1 parent 530a852 commit c0b1684
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/qgspallabeling.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2514,7 +2514,8 @@ void QgsPalLayerSettings::registerFeature( QgsFeature& f, QgsRenderContext &cont
} }


GEOSGeometry* geos_geom_clone; GEOSGeometry* geos_geom_clone;
if ( GEOSGeomTypeId_r( QgsGeometry::getGEOSHandler(), geos_geom ) == GEOS_POLYGON && repeatDistance > 0 && placement == Line ) GEOSGeomTypes geomType = (GEOSGeomTypes) GEOSGeomTypeId_r( QgsGeometry::getGEOSHandler(), geos_geom );
if ( (geomType == GEOS_POLYGON || geomType == GEOS_MULTIPOLYGON) && repeatDistance > 0 && placement == Line )
{ {
geos_geom_clone = GEOSBoundary_r( QgsGeometry::getGEOSHandler(), geos_geom ); geos_geom_clone = GEOSBoundary_r( QgsGeometry::getGEOSHandler(), geos_geom );
} }
Expand Down

0 comments on commit c0b1684

Please sign in to comment.