Skip to content
Permalink
Browse files

Fix labels don't render when mode is set to "From Symbol Bounds" and

features are not set to be obstacles for other labels
  • Loading branch information
nyalldawson committed Feb 12, 2020
1 parent b5f76d5 commit 1c53c7744be22d6ca44730eec87834ee7055089d
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/labeling/qgspallabeling.cpp
@@ -1962,7 +1962,7 @@ void QgsPalLayerSettings::registerFeature( const QgsFeature &f, QgsRenderContext
}
geos_geom_clone = QgsGeos::asGeos( geom );

if ( isObstacle )
if ( isObstacle || ( geom.type() == QgsWkbTypes::PointGeometry && offsetType == FromSymbolBounds ) )
{
if ( !obstacleGeometry.isNull() && QgsPalLabeling::geometryRequiresPreparation( obstacleGeometry, context, ct, doClip ? extentGeom : QgsGeometry(), mergeLines ) )
{
@@ -2363,7 +2363,7 @@ void QgsPalLayerSettings::registerFeature( const QgsFeature &f, QgsRenderContext
( *labelFeature )->setOverrunDistance( overrunDistanceEval );
( *labelFeature )->setOverrunSmoothDistance( overrunSmoothDist );
( *labelFeature )->setLabelAllParts( labelAll );
if ( geom.type() == QgsWkbTypes::PointGeometry && isObstacle && !obstacleGeometry.isNull() )
if ( geom.type() == QgsWkbTypes::PointGeometry && !obstacleGeometry.isNull() )
{
//register symbol size
( *labelFeature )->setSymbolSize( QSizeF( obstacleGeometry.boundingBox().width(),

0 comments on commit 1c53c77

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