Filter invalid rings during label geometry preparation

This commit is contained in:
Nyall Dawson 2018-05-30 00:08:32 +10:00
parent 2a70c4bcca
commit 6c0a1da076

View File

@ -58,6 +58,7 @@
#include "qgsproperty.h" #include "qgsproperty.h"
#include "qgssymbollayerutils.h" #include "qgssymbollayerutils.h"
#include "qgsmaptopixelgeometrysimplifier.h" #include "qgsmaptopixelgeometrysimplifier.h"
#include "qgscurvepolygon.h"
#include <QMessageBox> #include <QMessageBox>
@ -2904,6 +2905,8 @@ QgsGeometry QgsPalLabeling::prepareGeometry( const QgsGeometry &geometry, QgsRen
{ {
return std::isfinite( point.x() ) && std::isfinite( point.y() ); return std::isfinite( point.x() ) && std::isfinite( point.y() );
} ); } );
if ( QgsCurvePolygon *cp = qgsgeometry_cast< QgsCurvePolygon * >( geom.get() ) )
cp->removeInvalidRings();
} }
// Rotate the geometry if needed, before clipping // Rotate the geometry if needed, before clipping