@@ -80,12 +80,16 @@ void QgsSimpleFillSymbolLayerV2::startRender( QgsSymbolV2RenderContext& context
8080 }
8181
8282 QColor selColor = context.selectionColor ();
83- // selColor.setAlphaF( context.alpha() );
83+ QColor selPenColor = selColor == mColor ? selColor : mBorderColor ;
84+ if ( ! selectionIsOpaque ) selColor.setAlphaF ( context.alpha () );
8485 mSelBrush = QBrush ( selColor );
86+ // N.B. unless a "selection line colour" is implemented in addition to the "selection colour" option
87+ // this would mean symbols with "no fill" look the same whether or not they are selected
8588 if ( selectFillStyle )
8689 mSelBrush .setStyle ( mBrushStyle );
8790 mBorderColor .setAlphaF ( context.alpha () );
8891 mPen = QPen ( mBorderColor );
92+ mSelPen = QPen ( selPenColor );
8993 mPen .setStyle ( mBorderStyle );
9094 mPen .setWidthF ( context.outputLineWidth ( mBorderWidth ) );
9195}
@@ -105,6 +109,7 @@ void QgsSimpleFillSymbolLayerV2::renderPolygon( const QPolygonF& points, QList<Q
105109
106110 p->setBrush ( context.selected () ? mSelBrush : mBrush );
107111 p->setPen ( mPen );
112+ p->setPen ( context.selected () ? mSelPen : mPen );
108113
109114 if ( !mOffset .isNull () )
110115 p->translate ( mOffset );
@@ -213,8 +218,9 @@ void QgsImageFillSymbolLayer::renderPolygon( const QPolygonF& points, QList<QPol
213218 if ( context.selected () )
214219 {
215220 QColor selColor = context.selectionColor ();
216- if ( ! selectionIsOpaque )
217- selColor.setAlphaF ( context.alpha () );
221+ // Alister - this doesn't seem to work here
222+ // if ( ! selectionIsOpaque )
223+ // selColor.setAlphaF( context.alpha() );
218224 p->setBrush ( QBrush ( selColor ) );
219225 _renderPolygon ( p, points, rings );
220226 }
0 commit comments