Skip to content

Commit 8216f7d

Browse files
committedJan 22, 2015
Actually hook up missing datadefined outline style for ellipse marker
1 parent bed278a commit 8216f7d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
 

‎src/core/symbology-ng/qgsellipsesymbollayerv2.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,10 @@ QgsSymbolLayerV2* QgsEllipseSymbolLayerV2::create( const QgsStringMap& propertie
173173
{
174174
layer->setDataDefinedProperty( "outline_width", properties[ "outline_width_expression" ] );
175175
}
176+
if ( properties.contains( "outline_style_expression" ) )
177+
{
178+
layer->setDataDefinedProperty( "outline_style", properties[ "outline_style_expression" ] );
179+
}
176180
if ( properties.contains( "fill_color_expression" ) )
177181
{
178182
layer->setDataDefinedProperty( "fill_color", properties["fill_color_expression"] );
@@ -234,6 +238,7 @@ QgsSymbolLayerV2* QgsEllipseSymbolLayerV2::create( const QgsStringMap& propertie
234238
void QgsEllipseSymbolLayerV2::renderPoint( const QPointF& point, QgsSymbolV2RenderContext& context )
235239
{
236240
QgsExpression* outlineWidthExpression = expression( "outline_width" );
241+
QgsExpression* outlineStyleExpression = expression( "outline_style" );
237242
QgsExpression* fillColorExpression = expression( "fill_color" );
238243
QgsExpression* outlineColorExpression = expression( "outline_color" );
239244
QgsExpression* widthExpression = expression( "width" );
@@ -247,6 +252,11 @@ void QgsEllipseSymbolLayerV2::renderPoint( const QPointF& point, QgsSymbolV2Rend
247252
width *= QgsSymbolLayerV2Utils::lineWidthScaleFactor( context.renderContext(), mOutlineWidthUnit, mOutlineWidthMapUnitScale );
248253
mPen.setWidthF( width );
249254
}
255+
if ( outlineStyleExpression )
256+
{
257+
Qt::PenStyle style = QgsSymbolLayerV2Utils::decodePenStyle( outlineStyleExpression->evaluate( const_cast<QgsFeature*>( context.feature() ) ).toString() );
258+
mPen.setStyle( style );
259+
}
250260
if ( fillColorExpression )
251261
{
252262
QString colorString = fillColorExpression->evaluate( const_cast<QgsFeature*>( context.feature() ) ).toString();

0 commit comments

Comments
 (0)
Please sign in to comment.