Skip to content

Commit 5e9f6ac

Browse files
committedJan 23, 2017
Support @value in diagram property expressions
1 parent 43a3286 commit 5e9f6ac

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎src/core/qgsdiagramrenderer.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,9 +444,13 @@ void QgsDiagramRenderer::renderDiagram( const QgsFeature& feature, QgsRenderCont
444444

445445
if ( properties.hasActiveProperties() )
446446
{
447+
c.expressionContext().setOriginalValueVariable( s.transparency );
447448
s.transparency = properties.valueAsInt( QgsDiagramLayerSettings::Opacity, c.expressionContext(), s.transparency );
449+
c.expressionContext().setOriginalValueVariable( QgsSymbolLayerUtils::encodeColor( s.backgroundColor ) );
448450
s.backgroundColor = properties.valueAsColor( QgsDiagramLayerSettings::BackgroundColor, c.expressionContext(), s.backgroundColor );
451+
c.expressionContext().setOriginalValueVariable( QgsSymbolLayerUtils::encodeColor( s.penColor ) );
449452
s.penColor = properties.valueAsColor( QgsDiagramLayerSettings::OutlineColor, c.expressionContext(), s.penColor );
453+
c.expressionContext().setOriginalValueVariable( s.penWidth );
450454
s.penWidth = properties.valueAsDouble( QgsDiagramLayerSettings::OutlineWidth, c.expressionContext(), s.penWidth );
451455
}
452456

0 commit comments

Comments
 (0)
Please sign in to comment.