@@ -451,11 +451,12 @@ void QgsDxfExport::writeGroup( const QColor& color, int exactMatchCode, int rgbC
451
451
minDist = dist;
452
452
}
453
453
454
- if ( minDist == 0 && color. alpha () == 255 && minDistAt != 7 )
454
+ if ( minDist == 0 && minDistAt != 7 )
455
455
{
456
456
// exact full opaque match, not black/white
457
457
writeGroup ( exactMatchCode, minDistAt );
458
- return ;
458
+ if ( color.alpha () == 255 )
459
+ return ;
459
460
}
460
461
461
462
int c = ( color.red () & 0xff ) * 0x10000 + ( color.green () & 0xff ) * 0x100 + ( color.blue () & 0xff );
@@ -3437,21 +3438,24 @@ void QgsDxfExport::writePolyline( const QgsPointSequence &line, const QString& l
3437
3438
else
3438
3439
{
3439
3440
writeGroup ( 0 , " POLYLINE" );
3440
- writeHandle ();
3441
- writeGroup ( 8 , layer );
3441
+ int plHandle = writeHandle ();
3442
+ writeGroup ( 330 , mBlockHandle );
3442
3443
writeGroup ( 100 , " AcDbEntity" );
3443
- writeGroup ( 100 , " AcDb3dPolyline " );
3444
+ writeGroup ( 8 , layer );
3444
3445
writeGroup ( 6 , lineStyleName );
3445
- writeGroup ( 0 , QgsPointV2 ( QgsWkbTypes::PointZ ) );
3446
3446
writeGroup ( color );
3447
+ writeGroup ( 100 , " AcDb3dPolyline" );
3448
+ writeGroup ( 0 , QgsPointV2 ( QgsWkbTypes::PointZ ) );
3447
3449
writeGroup ( 70 , 8 );
3448
3450
3449
3451
for ( int i = 0 ; i < n; i++ )
3450
3452
{
3451
3453
writeGroup ( 0 , " VERTEX" );
3452
3454
writeHandle ();
3453
- writeGroup ( 8 , layer );
3455
+ writeGroup ( 330 , plHandle );
3454
3456
writeGroup ( 100 , " AcDbEntity" );
3457
+ writeGroup ( 8 , layer );
3458
+ writeGroup ( color );
3455
3459
writeGroup ( 100 , " AcDbVertex" );
3456
3460
writeGroup ( 100 , " AcDb3dPolylineVertex" );
3457
3461
writeGroup ( 0 , line[i] );
@@ -3460,8 +3464,10 @@ void QgsDxfExport::writePolyline( const QgsPointSequence &line, const QString& l
3460
3464
3461
3465
writeGroup ( 0 , " SEQEND" );
3462
3466
writeHandle ();
3463
- writeGroup ( 8 , layer );
3467
+ writeGroup ( 330 , plHandle );
3464
3468
writeGroup ( 100 , " AcDbEntity" );
3469
+ writeGroup ( 8 , layer );
3470
+ writeGroup ( color );
3465
3471
}
3466
3472
}
3467
3473
0 commit comments