Skip to content

Commit f5c03db

Browse files
committed
Fix line offset dxf export
1 parent b73ac0f commit f5c03db

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/core/symbology-ng/qgslinesymbollayerv2.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,13 @@ double QgsSimpleLineSymbolLayerV2::dxfOffset( const QgsDxfExport& e, QgsSymbolV2
654654
context.setOriginalValueVariable( mOffset );
655655
offset = evaluateDataDefinedProperty( QgsSymbolLayerV2::EXPR_OFFSET, context, mOffset ).toDouble();
656656
}
657-
return offset;
657+
658+
offset *= e.mapUnitScaleFactor( e.symbologyScaleDenominator(), offsetUnit(), e.mapUnits(), context.renderContext().mapToPixel().mapUnitsPerPixel() );
659+
if ( mOffsetUnit == QgsSymbolV2::MapUnit )
660+
{
661+
e.clipValueToMapUnitScale( offset, mOffsetMapUnitScale, context.renderContext().scaleFactor() );
662+
}
663+
return -offset; //direction seems to be inverse to symbology offset
658664
}
659665

660666
/////////

0 commit comments

Comments
 (0)