Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update src/core/vectortile/qgsmapboxglstyleconverter.cpp
  • Loading branch information
m-kuhn committed Mar 25, 2021
1 parent 80dba9d commit 5217d17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/vectortile/qgsmapboxglstyleconverter.cpp
Expand Up @@ -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() ) );
}
Expand Down

0 comments on commit 5217d17

Please sign in to comment.