Skip to content

Commit

Permalink
retrieve marker line interval from SLD, do not use default value when 0
Browse files Browse the repository at this point in the history
  • Loading branch information
brushtyler committed Aug 27, 2012
1 parent bcb0385 commit 727a27e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/core/symbology-ng/qgslinesymbollayerv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -779,8 +779,11 @@ QgsSymbolLayerV2* QgsMarkerLineSymbolLayerV2::createFromSld( QDomElement &elemen
marker = new QgsMarkerSymbolV2( layers );
}

if ( !marker )
return NULL;

double interval = 0.0;
QDomElement gapElem = element.firstChildElement( "Gap" );
QDomElement gapElem = graphicStrokeElem.firstChildElement( "Gap" );
if ( !gapElem.isNull() )
{
bool ok;
Expand All @@ -790,7 +793,7 @@ QgsSymbolLayerV2* QgsMarkerLineSymbolLayerV2::createFromSld( QDomElement &elemen
}

double offset = 0.0;
QDomElement perpOffsetElem = element.firstChildElement( "PerpendicularOffset" );
QDomElement perpOffsetElem = graphicStrokeElem.firstChildElement( "PerpendicularOffset" );
if ( !perpOffsetElem.isNull() )
{
bool ok;
Expand All @@ -801,12 +804,9 @@ QgsSymbolLayerV2* QgsMarkerLineSymbolLayerV2::createFromSld( QDomElement &elemen

QgsMarkerLineSymbolLayerV2* x = new QgsMarkerLineSymbolLayerV2( rotateMarker );
x->setPlacement( placement );
if ( !doubleNear( interval, 0.0 ) && interval > 0 )
x->setInterval( interval );
if ( marker )
x->setSubSymbol( marker );
if ( !doubleNear( offset, 0.0 ) )
x->setOffset( offset );
x->setInterval( interval );
x->setSubSymbol( marker );
x->setOffset( offset );
return x;
}

Expand Down

0 comments on commit 727a27e

Please sign in to comment.