Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Update src/core/vectortile/qgsmapboxglstyleconverter.cpp
- Loading branch information
Showing
with
1 addition
and
1 deletion.
-
+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() ) ); |
|
|
} |
|
|