Skip to content

Commit fb5cca2

Browse files
committed
Fix text linebreaks in dxf export
1 parent 605ef17 commit fb5cca2

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/core/dxf/qgsdxfpallabeling.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,15 @@ void QgsDxfPalLabeling::drawLabel( pal::LabelPosition* label, QgsRenderContext&
9797
}
9898
mDxfExport->writePolyline( line, layerName, "CONTINUOUS", 1, 0.01, true );*/
9999

100-
QStringList textList = text.split( tmpLyr.wrapChar );
100+
QStringList textList;
101+
if ( !tmpLyr.wrapChar.isEmpty() )
102+
{
103+
textList = text.split( tmpLyr.wrapChar );
104+
}
105+
else
106+
{
107+
textList = text.split( "\n" );
108+
}
101109
double textHeight = label->getHeight() / textList.size();
102110
QFontMetricsF fm( tmpLyr.textFont );
103111
double textAscent = textHeight * fm.ascent() / fm.height();

0 commit comments

Comments
 (0)