Skip to content
Permalink
Browse files
Support @value in diagram property expressions
  • Loading branch information
nyalldawson committed Jan 23, 2017
1 parent 43a3286 commit 5e9f6ac5cc9fc9559fc3de51bc5a2b289b6c52f4
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/core/qgsdiagramrenderer.cpp
@@ -444,9 +444,13 @@ void QgsDiagramRenderer::renderDiagram( const QgsFeature& feature, QgsRenderCont

if ( properties.hasActiveProperties() )
{
c.expressionContext().setOriginalValueVariable( s.transparency );
s.transparency = properties.valueAsInt( QgsDiagramLayerSettings::Opacity, c.expressionContext(), s.transparency );
c.expressionContext().setOriginalValueVariable( QgsSymbolLayerUtils::encodeColor( s.backgroundColor ) );
s.backgroundColor = properties.valueAsColor( QgsDiagramLayerSettings::BackgroundColor, c.expressionContext(), s.backgroundColor );
c.expressionContext().setOriginalValueVariable( QgsSymbolLayerUtils::encodeColor( s.penColor ) );
s.penColor = properties.valueAsColor( QgsDiagramLayerSettings::OutlineColor, c.expressionContext(), s.penColor );
c.expressionContext().setOriginalValueVariable( s.penWidth );
s.penWidth = properties.valueAsDouble( QgsDiagramLayerSettings::OutlineWidth, c.expressionContext(), s.penWidth );
}

0 comments on commit 5e9f6ac

Please sign in to comment.