Skip to content

Commit dea2927

Browse files
committedOct 6, 2016
Fix arrow and filled marker symbols don't show selection state
(cherry-picked from 8ffa084)
1 parent c4cace0 commit dea2927

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed
 

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ void QgsArrowSymbolLayer::renderPolyline( const QPolygonF& points, QgsSymbolV2Re
709709
QPointF pd( points.back() );
710710

711711
QPolygonF poly = curvedArrow( po, pm, pd, mScaledArrowStartWidth, mScaledArrowWidth, mScaledHeadLength, mScaledHeadThickness, mComputedHeadType, mComputedArrowType, mScaledOffset );
712-
mSymbol->renderPolygon( poly, /* rings */ nullptr, context.feature(), context.renderContext() );
712+
mSymbol->renderPolygon( poly, /* rings */ nullptr, context.feature(), context.renderContext(), -1, context.selected() );
713713
}
714714
// straight arrow
715715
else if ( points.size() == 2 )
@@ -720,7 +720,7 @@ void QgsArrowSymbolLayer::renderPolyline( const QPolygonF& points, QgsSymbolV2Re
720720
QPointF pd( points.at( 1 ) );
721721

722722
QPolygonF poly = straightArrow( po, pd, mScaledArrowStartWidth, mScaledArrowWidth, mScaledHeadLength, mScaledHeadThickness, mComputedHeadType, mComputedArrowType, mScaledOffset );
723-
mSymbol->renderPolygon( poly, /* rings */ nullptr, context.feature(), context.renderContext() );
723+
mSymbol->renderPolygon( poly, /* rings */ nullptr, context.feature(), context.renderContext(), -1, context.selected() );
724724
}
725725
}
726726
else
@@ -740,7 +740,7 @@ void QgsArrowSymbolLayer::renderPolyline( const QPolygonF& points, QgsSymbolV2Re
740740
QPointF pd( points.at( pIdx + 2 ) );
741741

742742
QPolygonF poly = curvedArrow( po, pm, pd, mScaledArrowStartWidth, mScaledArrowWidth, mScaledHeadLength, mScaledHeadThickness, mComputedHeadType, mComputedArrowType, mScaledOffset );
743-
mSymbol->renderPolygon( poly, /* rings */ nullptr, context.feature(), context.renderContext() );
743+
mSymbol->renderPolygon( poly, /* rings */ nullptr, context.feature(), context.renderContext(), -1, context.selected() );
744744
}
745745
// straight arrow
746746
else if ( points.size() - pIdx == 2 )
@@ -751,7 +751,7 @@ void QgsArrowSymbolLayer::renderPolyline( const QPolygonF& points, QgsSymbolV2Re
751751
QPointF pd( points.at( pIdx + 1 ) );
752752

753753
QPolygonF poly = straightArrow( po, pd, mScaledArrowStartWidth, mScaledArrowWidth, mScaledHeadLength, mScaledHeadThickness, mComputedHeadType, mComputedArrowType, mScaledOffset );
754-
mSymbol->renderPolygon( poly, /* rings */ nullptr, context.feature(), context.renderContext() );
754+
mSymbol->renderPolygon( poly, /* rings */ nullptr, context.feature(), context.renderContext(), -1, context.selected() );
755755
}
756756
}
757757
}
@@ -770,7 +770,7 @@ void QgsArrowSymbolLayer::renderPolyline( const QPolygonF& points, QgsSymbolV2Re
770770
QPointF pd( points.back() );
771771

772772
QPolygonF poly = straightArrow( po, pd, mScaledArrowStartWidth, mScaledArrowWidth, mScaledHeadLength, mScaledHeadThickness, mComputedHeadType, mComputedArrowType, mScaledOffset );
773-
mSymbol->renderPolygon( poly, /* rings */ nullptr, context.feature(), context.renderContext() );
773+
mSymbol->renderPolygon( poly, /* rings */ nullptr, context.feature(), context.renderContext(), -1, context.selected() );
774774
}
775775
}
776776
else
@@ -787,7 +787,7 @@ void QgsArrowSymbolLayer::renderPolyline( const QPolygonF& points, QgsSymbolV2Re
787787
QPointF pd( points.at( pIdx + 1 ) );
788788

789789
QPolygonF poly = straightArrow( po, pd, mScaledArrowStartWidth, mScaledArrowWidth, mScaledHeadLength, mScaledHeadThickness, mComputedHeadType, mComputedArrowType, mScaledOffset );
790-
mSymbol->renderPolygon( poly, /* rings */ nullptr, context.feature(), context.renderContext() );
790+
mSymbol->renderPolygon( poly, /* rings */ nullptr, context.feature(), context.renderContext(), -1, context.selected() );
791791
}
792792
}
793793
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1726,12 +1726,12 @@ void QgsFilledMarkerSymbolLayer::draw( QgsSymbolV2RenderContext &context, QgsSim
17261726

17271727
if ( !polygon.isEmpty() )
17281728
{
1729-
mFill->renderPolygon( polygon, /* rings */ nullptr, context.feature(), context.renderContext() );
1729+
mFill->renderPolygon( polygon, /* rings */ nullptr, context.feature(), context.renderContext(), -1, context.selected() );
17301730
}
17311731
else
17321732
{
17331733
QPolygonF poly = path.toFillPolygon();
1734-
mFill->renderPolygon( poly, /* rings */ nullptr, context.feature(), context.renderContext() );
1734+
mFill->renderPolygon( poly, /* rings */ nullptr, context.feature(), context.renderContext(), -1, context.selected() );
17351735
}
17361736

17371737

0 commit comments

Comments
 (0)
Please sign in to comment.