Skip to content

Commit

Permalink
Fix first marker is drawn twice for marker line interval mode
Browse files Browse the repository at this point in the history
(cherry-picked from 748d8ac)
  • Loading branch information
nyalldawson committed Oct 12, 2016
1 parent 3c43bb5 commit a6dc6ac
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/core/symbology-ng/qgslinesymbollayerv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,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;
Expand Down Expand Up @@ -995,12 +994,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 )
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a6dc6ac

Please sign in to comment.