Skip to content

Commit

Permalink
Actually hook up missing datadefined outline style for ellipse marker
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 22, 2015
1 parent bed278a commit 8216f7d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/core/symbology-ng/qgsellipsesymbollayerv2.cpp
Expand Up @@ -173,6 +173,10 @@ QgsSymbolLayerV2* QgsEllipseSymbolLayerV2::create( const QgsStringMap& propertie
{
layer->setDataDefinedProperty( "outline_width", properties[ "outline_width_expression" ] );
}
if ( properties.contains( "outline_style_expression" ) )
{
layer->setDataDefinedProperty( "outline_style", properties[ "outline_style_expression" ] );
}
if ( properties.contains( "fill_color_expression" ) )
{
layer->setDataDefinedProperty( "fill_color", properties["fill_color_expression"] );
Expand Down Expand Up @@ -234,6 +238,7 @@ QgsSymbolLayerV2* QgsEllipseSymbolLayerV2::create( const QgsStringMap& propertie
void QgsEllipseSymbolLayerV2::renderPoint( const QPointF& point, QgsSymbolV2RenderContext& context )
{
QgsExpression* outlineWidthExpression = expression( "outline_width" );
QgsExpression* outlineStyleExpression = expression( "outline_style" );
QgsExpression* fillColorExpression = expression( "fill_color" );
QgsExpression* outlineColorExpression = expression( "outline_color" );
QgsExpression* widthExpression = expression( "width" );
Expand All @@ -247,6 +252,11 @@ void QgsEllipseSymbolLayerV2::renderPoint( const QPointF& point, QgsSymbolV2Rend
width *= QgsSymbolLayerV2Utils::lineWidthScaleFactor( context.renderContext(), mOutlineWidthUnit, mOutlineWidthMapUnitScale );
mPen.setWidthF( width );
}
if ( outlineStyleExpression )
{
Qt::PenStyle style = QgsSymbolLayerV2Utils::decodePenStyle( outlineStyleExpression->evaluate( const_cast<QgsFeature*>( context.feature() ) ).toString() );
mPen.setStyle( style );
}
if ( fillColorExpression )
{
QString colorString = fillColorExpression->evaluate( const_cast<QgsFeature*>( context.feature() ) ).toString();
Expand Down

0 comments on commit 8216f7d

Please sign in to comment.