diff --git a/sources/exportdialog.cpp b/sources/exportdialog.cpp index cd30cf6f2..d962d27f7 100644 --- a/sources/exportdialog.cpp +++ b/sources/exportdialog.cpp @@ -554,7 +554,10 @@ void ExportDialog::generateDxf( continue; QTransform t = QTransform().translate(elem_pos_x,elem_pos_y).rotate(rotation_angle); QPolygonF poly = t.map(polygon); - Createdxf::drawPolygon(file_path,poly,0); + if(poly.isClosed()) + Createdxf::drawPolygon(file_path,poly,0); + else + Createdxf::drawPolyline(file_path,poly,0); } // Draw arcs and ellipses diff --git a/sources/qetgraphicsitem/qetshapeitem.cpp b/sources/qetgraphicsitem/qetshapeitem.cpp index d0c705af7..db95ecdb8 100644 --- a/sources/qetgraphicsitem/qetshapeitem.cpp +++ b/sources/qetgraphicsitem/qetshapeitem.cpp @@ -970,7 +970,10 @@ bool QetShapeItem::toDXF(const QString &filepath,const QPen &pen) Createdxf::dxfColor(pen)); return true; case Polygon: - Createdxf::drawPolygon(filepath,m_polygon,Createdxf::dxfColor(pen)); + if(m_polygon.isClosed()) + Createdxf::drawPolygon(filepath,m_polygon,Createdxf::dxfColor(pen)); + else + Createdxf::drawPolyline(filepath,m_polygon,Createdxf::dxfColor(pen)); return true; default: return false;