Skip to content
Permalink
Browse files
[labelling] fix font size @value variable (fixes #16362) (#4273)
  • Loading branch information
nirvn committed Mar 17, 2017
1 parent e5f5814 commit 25fe2b07b9bd2b991d5359817053470797d1c379
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/core/qgspallabeling.cpp
@@ -1158,6 +1158,7 @@ void QgsPalLayerSettings::registerFeature( QgsFeature &f, QgsRenderContext &cont
if ( useScaleVisibility )
{
// data defined min scale?
context.expressionContext().setOriginalValueVariable( scaleMin );
double minScale = mDataDefinedProperties.valueAsDouble( QgsPalLayerSettings::MinScale, context.expressionContext(), scaleMin );

// scales closer than 1:1
@@ -1172,6 +1173,7 @@ void QgsPalLayerSettings::registerFeature( QgsFeature &f, QgsRenderContext &cont
}

// data defined max scale?
context.expressionContext().setOriginalValueVariable( scaleMax );
double maxScale = mDataDefinedProperties.valueAsDouble( QgsPalLayerSettings::MaxScale, context.expressionContext(), scaleMax );

// scales closer than 1:1
@@ -1205,6 +1207,7 @@ void QgsPalLayerSettings::registerFeature( QgsFeature &f, QgsRenderContext &cont
}

//data defined label size?
context.expressionContext().setOriginalValueVariable( mFormat.size() );
double fontSize = mDataDefinedProperties.valueAsDouble( QgsPalLayerSettings::Size, context.expressionContext(), mFormat.size() );
if ( fontSize <= 0.0 )
{

0 comments on commit 25fe2b0

Please sign in to comment.