Skip to content

Commit 3b01646

Browse files
committed
Add missing "interval" and "curvepoint" modes to data defined line marker (fix #16212)
1 parent 6f9cf1b commit 3b01646

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/core/symbology-ng/qgslinesymbollayer.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,11 @@ void QgsMarkerLineSymbolLayer::renderPolyline( const QPolygonF& points, QgsSymbo
829829
if ( exprVal.isValid() )
830830
{
831831
QString placementString = exprVal.toString();
832-
if ( placementString.compare( QLatin1String( "vertex" ), Qt::CaseInsensitive ) == 0 )
832+
if ( placementString.compare( QLatin1String( "interval" ), Qt::CaseInsensitive ) == 0 )
833+
{
834+
placement = Interval;
835+
}
836+
else if ( placementString.compare( QLatin1String( "vertex" ), Qt::CaseInsensitive ) == 0 )
833837
{
834838
placement = Vertex;
835839
}

src/core/symbology-ng/qgssymbollayer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ void QgsSymbolLayer::initPropertyDefinitions()
7777
{ QgsSymbolLayer::PropertyAlpha, QgsPropertyDefinition( "alpha", QObject::tr( "Opacity" ), QgsPropertyDefinition::Double0To1 )},
7878
{ QgsSymbolLayer::PropertyCustomDash, QgsPropertyDefinition( "customDash", QgsPropertyDefinition::DataTypeString, QObject::tr( "Custom dash pattern" ), QObject::tr( "[<b><dash>;<space></b>] e.g. '8;2;1;2'" ) )},
7979
{ QgsSymbolLayer::PropertyCapStyle, QgsPropertyDefinition( "capStyle", QObject::tr( "Line cap style" ), QgsPropertyDefinition::CapStyle )},
80-
{ QgsSymbolLayer::PropertyPlacement, QgsPropertyDefinition( "placement", QgsPropertyDefinition::DataTypeString, QObject::tr( "Marker placement" ), QObject::tr( "string " ) + "[<b>vertex</b>|<b>lastvertex</b>|<b>firstvertex</b>|<b>centerpoint</b>]" )},
80+
{ QgsSymbolLayer::PropertyPlacement, QgsPropertyDefinition( "placement", QgsPropertyDefinition::DataTypeString, QObject::tr( "Marker placement" ), QObject::tr( "string " ) + "[<b>interval</b>|<b>vertex</b>|<b>lastvertex</b>|<b>firstvertex</b>|<b>centerpoint</b>|<b>curvepoint</b>]" )},
8181
{ QgsSymbolLayer::PropertyInterval, QgsPropertyDefinition( "interval", QObject::tr( "Marker interval" ), QgsPropertyDefinition::DoublePositive )},
8282
{ QgsSymbolLayer::PropertyOffsetAlongLine, QgsPropertyDefinition( "offsetAlongLine", QObject::tr( "Offset along line" ), QgsPropertyDefinition::DoublePositive )},
8383
{ QgsSymbolLayer::PropertyHorizontalAnchor, QgsPropertyDefinition( "hAnchor", QObject::tr( "Horizontal anchor point" ), QgsPropertyDefinition::HorizontalAnchor )},

0 commit comments

Comments
 (0)