Skip to content

Commit db82317

Browse files
committedFeb 21, 2019
dxf export: fix output of closed 3d polylines (fixes #20242)
(cherry picked from commit 56ec473)
1 parent 23c01de commit db82317

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

‎src/core/dxf/qgsdxfexport.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3477,9 +3477,6 @@ void QgsDxfExport::writePolyline( const QgsPointSequence &line, const QString &l
34773477
return;
34783478
}
34793479

3480-
bool polygon = line[0] == line[ line.size() - 1 ];
3481-
if ( polygon )
3482-
--n;
34833480
if ( n < 2 )
34843481
{
34853482
QgsDebugMsg( QStringLiteral( "writePolyline: line too short layer=%1 lineStyleName=%2" ).arg( layer, lineStyleName ) );
@@ -3488,6 +3485,10 @@ void QgsDxfExport::writePolyline( const QgsPointSequence &line, const QString &l
34883485

34893486
if ( mForce2d || !line.at( 0 ).is3D() )
34903487
{
3488+
bool polygon = line[0] == line[ line.size() - 1 ];
3489+
if ( polygon )
3490+
--n;
3491+
34913492
writeGroup( 0, QStringLiteral( "LWPOLYLINE" ) );
34923493
writeHandle();
34933494
writeGroup( 8, layer );

0 commit comments

Comments
 (0)
Please sign in to comment.