Skip to content

Commit

Permalink
Fix line offset dxf export
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Apr 12, 2018
1 parent b73ac0f commit f5c03db
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/core/symbology-ng/qgslinesymbollayerv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,13 @@ double QgsSimpleLineSymbolLayerV2::dxfOffset( const QgsDxfExport& e, QgsSymbolV2
context.setOriginalValueVariable( mOffset );
offset = evaluateDataDefinedProperty( QgsSymbolLayerV2::EXPR_OFFSET, context, mOffset ).toDouble();
}
return offset;

offset *= e.mapUnitScaleFactor( e.symbologyScaleDenominator(), offsetUnit(), e.mapUnits(), context.renderContext().mapToPixel().mapUnitsPerPixel() );
if ( mOffsetUnit == QgsSymbolV2::MapUnit )
{
e.clipValueToMapUnitScale( offset, mOffsetMapUnitScale, context.renderContext().scaleFactor() );
}
return -offset; //direction seems to be inverse to symbology offset
}

/////////
Expand Down

0 comments on commit f5c03db

Please sign in to comment.