Skip to content
Permalink
Browse files

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)
  • Loading branch information
nyalldawson committed Jul 27, 2016
1 parent 5ebe9d1 commit bfa771414f31611a6a0d2f9ad3488ee0de7ffa5c
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/core/qgspallabeling.cpp
@@ -2517,7 +2517,8 @@ void QgsPalLayerSettings::registerFeature( QgsFeature& f, QgsRenderContext &cont
}

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 );
}

0 comments on commit bfa7714

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