Skip to content

Commit

Permalink
Fix issue #28854 Export project to dxf symbol size
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored and nyalldawson committed Feb 7, 2020
1 parent 7f00a40 commit 7f23012
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/core/symbology/qgsmarkersymbollayer.cpp
Expand Up @@ -1233,8 +1233,6 @@ void QgsSimpleMarkerSymbolLayer::drawMarker( QPainter *p, QgsSymbolRenderContext

bool QgsSimpleMarkerSymbolLayer::writeDxf( QgsDxfExport &e, double mmMapUnitScaleFactor, const QString &layerName, QgsSymbolRenderContext &context, QPointF shift ) const
{
Q_UNUSED( mmMapUnitScaleFactor )

//data defined size?
double size = mSize;

Expand All @@ -1260,6 +1258,12 @@ bool QgsSimpleMarkerSymbolLayer::writeDxf( QgsDxfExport &e, double mmMapUnitScal

size *= e.mapUnitScaleFactor( e.symbologyScale(), mSizeUnit, e.mapUnits(), context.renderContext().mapToPixel().mapUnitsPerPixel() );
}

if ( mSizeUnit == QgsUnitTypes::RenderMillimeters )
{
size *= mmMapUnitScaleFactor;
}

if ( mSizeUnit == QgsUnitTypes::RenderMapUnits )
{
e.clipValueToMapUnitScale( size, mSizeMapUnitScale, context.renderContext().scaleFactor() );
Expand Down

0 comments on commit 7f23012

Please sign in to comment.