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