Skip to content
Permalink
Browse files

retrieve marker line interval from SLD, do not use default value when 0

  • Loading branch information
brushtyler committed Aug 27, 2012
1 parent bcb0385 commit 727a27e4040e158528bccc537855c4e68caa9588
Showing with 8 additions and 8 deletions.
  1. +8 −8 src/core/symbology-ng/qgslinesymbollayerv2.cpp
@@ -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;
@@ -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;
@@ -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;
}

0 comments on commit 727a27e

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