Skip to content
Permalink
Browse files

[labeling] Fix broken data defined shape radius setting

  • Loading branch information
nyalldawson committed Feb 28, 2018
1 parent b17a556 commit 2345852fdffede414ef46dc790ecbbc6aa460d9c
Showing with 14 additions and 2 deletions.
  1. +12 −1 src/core/qgspallabeling.cpp
  2. +2 −1 src/core/qgspallabeling.h
@@ -2186,6 +2186,17 @@ bool QgsPalLayerSettings::dataDefinedValEval( DataDefinedValueType valType,
}
return false;
}
case DDSizeF:
{
QString ptstr = exprVal.toString().trimmed();

if ( !ptstr.isEmpty() )
{
dataDefinedValues.insert( p, QVariant( QgsSymbolLayerUtils::decodeSize( ptstr ) ) );
return true;
}
return false;
}
}
}
return false;
@@ -2671,7 +2682,7 @@ void QgsPalLayerSettings::parseShapeBackground( QgsRenderContext &context )
dataDefinedValEval( DDUnits, QgsPalLayerSettings::ShapeOffsetUnits, exprVal, context.expressionContext() );

// data defined shape radii?
dataDefinedValEval( DDPointF, QgsPalLayerSettings::ShapeRadii, exprVal, context.expressionContext(), QgsSymbolLayerUtils::encodeSize( background.radii() ) );
dataDefinedValEval( DDSizeF, QgsPalLayerSettings::ShapeRadii, exprVal, context.expressionContext(), QgsSymbolLayerUtils::encodeSize( background.radii() ) );

// data defined shape radii units?
dataDefinedValEval( DDUnits, QgsPalLayerSettings::ShapeRadiiUnits, exprVal, context.expressionContext() );
@@ -847,7 +847,8 @@ class CORE_EXPORT QgsPalLayerSettings
DDColor,
DDJoinStyle,
DDBlendMode,
DDPointF
DDPointF,
DDSizeF, //!< Data defined size
};

// convenience data defined evaluation function

0 comments on commit 2345852

Please sign in to comment.
You can’t perform that action at this time.