Skip to content

Commit

Permalink
[labelling] fix font size @value variable (fixes #16362) (#4273)
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn authored Mar 17, 2017
1 parent e5f5814 commit 25fe2b0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/qgspallabeling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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 )
{
Expand Down

0 comments on commit 25fe2b0

Please sign in to comment.