Skip to content

Commit

Permalink
Fix text linebreaks in dxf export
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Jun 17, 2014
1 parent 605ef17 commit fb5cca2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/core/dxf/qgsdxfpallabeling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,15 @@ void QgsDxfPalLabeling::drawLabel( pal::LabelPosition* label, QgsRenderContext&
}
mDxfExport->writePolyline( line, layerName, "CONTINUOUS", 1, 0.01, true );*/

QStringList textList = text.split( tmpLyr.wrapChar );
QStringList textList;
if ( !tmpLyr.wrapChar.isEmpty() )
{
textList = text.split( tmpLyr.wrapChar );
}
else
{
textList = text.split( "\n" );
}
double textHeight = label->getHeight() / textList.size();
QFontMetricsF fm( tmpLyr.textFont );
double textAscent = textHeight * fm.ascent() / fm.height();
Expand Down

0 comments on commit fb5cca2

Please sign in to comment.