Skip to content

Commit

Permalink
Fix offset is ignored for simple line symbology
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 8, 2014
1 parent 6bb045b commit 344eccd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/core/symbology-ng/qgslinesymbollayerv2.cpp 100644 → 100755
Expand Up @@ -294,7 +294,7 @@ void QgsSimpleLineSymbolLayerV2::renderPolyline( const QPolygonF& points, QgsSym
return;
}

double offset = 0.0;
double offset = mOffset;
applyDataDefinedSymbology( context, mPen, mSelPen, offset );

p->setPen( context.selected() ? mSelPen : mPen );
Expand All @@ -311,7 +311,7 @@ void QgsSimpleLineSymbolLayerV2::renderPolyline( const QPolygonF& points, QgsSym
return;
}

if ( offset == 0 )
if ( qgsDoubleNear( offset, 0 ) )
{
p->drawPolyline( points );
}
Expand Down Expand Up @@ -480,7 +480,6 @@ void QgsSimpleLineSymbolLayerV2::applyDataDefinedSymbology( QgsSymbolV2RenderCon
}

//offset
offset = mOffset;
QgsExpression* lineOffsetExpression = expression( "offset" );
if ( lineOffsetExpression )
{
Expand Down

0 comments on commit 344eccd

Please sign in to comment.