Skip to content

Commit

Permalink
Fix TABLE sections
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Oct 29, 2013
1 parent 9312276 commit 523f1e1
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/core/qgsdxfexport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ void QgsDxfExport::writeTables( QTextStream& stream )
//LTYPE
stream << " 0\n";
stream << "TABLE\n";
stream << " 2\n";
stream << "LTYPE\n";
stream << " 70\n";
stream << " 1\n"; //number of linetypes
stream << " 0\n";
stream << "LTYPE\n";
stream << " 2\n";
Expand All @@ -139,8 +143,10 @@ void QgsDxfExport::writeTables( QTextStream& stream )
//LAYER
stream << " 0\n";
stream << "TABLE\n";
stream << " 0\n";
stream << " 2\n";
stream << "LAYER\n";
stream << " 70\n";
stream << mLayers.count() << "\n";
QList< QgsMapLayer* >::iterator layerIt = mLayers.begin();
for ( ; layerIt != mLayers.end(); ++layerIt )
{
Expand Down Expand Up @@ -237,7 +243,8 @@ void QgsDxfExport::writeEntitiesSymbolLevels( QTextStream& stream )

void QgsDxfExport::writeEndFile( QTextStream& stream )
{
endSection( stream );
stream << " 0\n";
stream << "EOF\n";
}

void QgsDxfExport::startSection( QTextStream& stream )
Expand Down Expand Up @@ -278,6 +285,8 @@ void QgsDxfExport::writePolyline( QTextStream& stream, const QgsPolyline& line,
{
writeVertex( stream, *lineIt, layer );
}
stream << " 0\n";
stream << "SEQEND\n";
}

void QgsDxfExport::writeVertex( QTextStream& stream, const QgsPoint& pt, const QString& layer )
Expand Down

0 comments on commit 523f1e1

Please sign in to comment.