Skip to content
Permalink
Browse files

Update src/core/vectortile/qgsmapboxglstyleconverter.cpp

  • Loading branch information
m-kuhn committed Mar 25, 2021
1 parent 80dba9d commit 5217d172cc66976e58ee8f44f186f67170a0c6ce
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/vectortile/qgsmapboxglstyleconverter.cpp
@@ -1481,7 +1481,7 @@ void QgsMapBoxGlStyleConverter::parseSymbolLayer( const QVariantMap &jsonLayer,
labelSettings.distUnits = context.targetUnit();
labelSettings.dist = std::abs( textOffset.y() ) - textSize;
labelSettings.lineSettings().setPlacementFlags( textOffset.y() > 0.0 ? QgsLabeling::BelowLine : QgsLabeling::AboveLine );
if ( !textSizeProperty )
if ( textSizeProperty && !textOffsetProperty )
{
ddLabelProperties.setProperty( QgsPalLayerSettings::LabelDistance, QStringLiteral( "with_variable('text_size',%2,%1*@text_size-@text_size)" ).arg( std::abs( textOffset.y() / textSize ) ).arg( textSizeProperty.asExpression() ) );
}

0 comments on commit 5217d17

Please sign in to comment.