Skip to content
Permalink
Browse files

Fix first marker is drawn twice for marker line interval mode

(cherry-picked from 748d8ac)
  • Loading branch information
nyalldawson committed Oct 13, 2016
1 parent bd5f979 commit 94861665ddec4973b226bf1aa89923de10ec2f81
@@ -944,7 +944,6 @@ void QgsMarkerLineSymbolLayerV2::renderPolylineInterval( const QPolygonF& points

QPointF lastPt = points[0];
double lengthLeft = 0; // how much is left until next marker
bool first = mOffsetAlongLine ? false : true; //only draw marker at first vertex when no offset along line is set

QgsRenderContext& rc = context.renderContext();
double interval = mInterval;
@@ -991,12 +990,6 @@ void QgsMarkerLineSymbolLayerV2::renderPolylineInterval( const QPolygonF& points
mMarker->setLineAngle( l.angle() * 180 / M_PI );
}

// draw first marker
if ( first )
{
mMarker->renderPoint( lastPt, context.feature(), rc, -1, context.selected() );
first = false;
}

// while we're not at the end of line segment, draw!
while ( lengthLeft > painterUnitInterval )
Binary file not shown.

0 comments on commit 9486166

Please sign in to comment.
You can’t perform that action at this time.