We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 8152a00 commit 09110eaCopy full SHA for 09110ea
src/core/qgstextrenderer.cpp
@@ -1423,7 +1423,11 @@ void QgsTextFormat::readFromLayer( QgsVectorLayer *layer )
1423
1424
void QgsTextFormat::readXml( const QDomElement &elem, const QgsReadWriteContext &context )
1425
{
1426
- QDomElement textStyleElem = elem.firstChildElement( QStringLiteral( "text-style" ) );
+ QDomElement textStyleElem;
1427
+ if ( elem.nodeName() == QStringLiteral( "text-style" ) )
1428
+ textStyleElem = elem;
1429
+ else
1430
+ textStyleElem = elem.firstChildElement( QStringLiteral( "text-style" ) );
1431
QFont appFont = QApplication::font();
1432
mTextFontFamily = textStyleElem.attribute( QStringLiteral( "fontFamily" ), appFont.family() );
1433
QString fontFamily = mTextFontFamily;
0 commit comments