Skip to content

Commit afdc9b6

Browse files
committed
Dxf export: fix data defined properties in simple marker
1 parent b335661 commit afdc9b6

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

src/core/symbology-ng/qgsmarkersymbollayerv2.cpp

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,13 +1296,9 @@ bool QgsSimpleMarkerSymbolLayerV2::writeDxf( QgsDxfExport& e, double mmMapUnitSc
12961296
break;
12971297
}
12981298
}
1299-
1300-
size = QgsSymbolLayerV2Utils::convertToPainterUnits( context.renderContext(), size, mSizeUnit, mSizeMapUnitScale );
1301-
}
1302-
if ( mSizeUnit == QgsSymbolV2::MM )
1303-
{
1304-
size *= mmMapUnitScaleFactor;
13051299
}
1300+
1301+
size *= e.mapUnitScaleFactor( e.symbologyScaleDenominator(), mSizeUnit, e.mapUnits() );
13061302
double halfSize = size / 2.0;
13071303

13081304
//outlineWidth
@@ -1313,10 +1309,7 @@ bool QgsSimpleMarkerSymbolLayerV2::writeDxf( QgsDxfExport& e, double mmMapUnitSc
13131309
context.setOriginalValueVariable( mOutlineWidth );
13141310
outlineWidth = evaluateDataDefinedProperty( QgsSymbolLayerV2::EXPR_OUTLINE_WIDTH, context, mOutlineWidth ).toDouble();
13151311
}
1316-
if ( mSizeUnit == QgsSymbolV2::MM )
1317-
{
1318-
outlineWidth *= mmMapUnitScaleFactor;
1319-
}
1312+
outlineWidth *= e.mapUnitScaleFactor( e.symbologyScaleDenominator(), mSizeUnit, e.mapUnits() );
13201313

13211314
//color
13221315
QColor pc = mPen.color();
@@ -1368,10 +1361,7 @@ bool QgsSimpleMarkerSymbolLayerV2::writeDxf( QgsDxfExport& e, double mmMapUnitSc
13681361
if ( angle )
13691362
off = _rotatedOffset( off, angle );
13701363

1371-
if ( mSizeUnit == QgsSymbolV2::MM )
1372-
{
1373-
off *= mmMapUnitScaleFactor;
1374-
}
1364+
off *= e.mapUnitScaleFactor( e.symbologyScaleDenominator(), mSizeUnit, e.mapUnits() );
13751365

13761366
QTransform t;
13771367
t.translate( shift.x() + offsetX, shift.y() + offsetY );

0 commit comments

Comments
 (0)