Skip to content

Commit

Permalink
Fix @geometry_point_num value for marker lines following InnerVertices
Browse files Browse the repository at this point in the history
change
  • Loading branch information
nyalldawson committed Nov 17, 2021
1 parent fdc895e commit ad4810c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/symbology/qgslinesymbollayer.cpp
Expand Up @@ -1880,6 +1880,8 @@ void QgsTemplatedLineSymbolLayerBase::renderPolylineVertex( const QPolygonF &poi
return;
}

int pointNum = 0;

switch ( placement )
{
case Qgis::MarkerLinePlacement::FirstVertex:
Expand All @@ -1892,13 +1894,15 @@ void QgsTemplatedLineSymbolLayerBase::renderPolylineVertex( const QPolygonF &poi
case Qgis::MarkerLinePlacement::LastVertex:
{
i = points.count() - 1;
pointNum = i;
maxCount = points.count();
break;
}

case Qgis::MarkerLinePlacement::InnerVertices:
{
i = 1;
pointNum = 1;
maxCount = points.count() - 1;
break;
}
Expand Down Expand Up @@ -1930,7 +1934,6 @@ void QgsTemplatedLineSymbolLayerBase::renderPolylineVertex( const QPolygonF &poi
return;
}

int pointNum = 0;
QPointF prevPoint;
if ( placement == Qgis::MarkerLinePlacement::SegmentCenter && !points.empty() )
prevPoint = points.at( 0 );
Expand Down

0 comments on commit ad4810c

Please sign in to comment.