Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
dxf export: fix output of closed 3d polylines (fixes #20242)
  • Loading branch information
jef-n committed Feb 21, 2019
1 parent 4b55dbe commit 56ec473
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/core/dxf/qgsdxfexport.cpp
Expand Up @@ -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 ) );
Expand All @@ -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 );
Expand Down

0 comments on commit 56ec473

Please sign in to comment.