Skip to content
Permalink
Browse files

dxf export: fix output of closed 3d polylines (fixes #20242)

  • Loading branch information
jef-n committed Feb 21, 2019
1 parent 4b55dbe commit 56ec47328b9e24951b51c00144221c95f88c6c83
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/core/dxf/qgsdxfexport.cpp
@@ -3478,9 +3478,6 @@ void QgsDxfExport::writePolyline( const QgsPointSequence &line, const QString &l
return;
}

bool polygon = line[0] == line[ line.size() - 1 ];
if ( polygon )
--n;
if ( n < 2 )
{
QgsDebugMsg( QStringLiteral( "writePolyline: line too short layer=%1 lineStyleName=%2" ).arg( layer, lineStyleName ) );
@@ -3489,6 +3486,10 @@ void QgsDxfExport::writePolyline( const QgsPointSequence &line, const QString &l

if ( mForce2d || !line.at( 0 ).is3D() )
{
bool polygon = line[0] == line[ line.size() - 1 ];
if ( polygon )
--n;

writeGroup( 0, QStringLiteral( "LWPOLYLINE" ) );
writeHandle();
writeGroup( 8, layer );

0 comments on commit 56ec473

Please sign in to comment.
You can’t perform that action at this time.