@@ -440,10 +440,13 @@ bool QgsAnnotationLayer::writeXml( QDomNode &layer_node, QDomDocument &doc, cons
440
440
return writeSymbology ( layer_node, doc, errorMsg, context );
441
441
}
442
442
443
- bool QgsAnnotationLayer::writeSymbology ( QDomNode &node, QDomDocument &doc, QString &, const QgsReadWriteContext &, QgsMapLayer::StyleCategories categories ) const
443
+ bool QgsAnnotationLayer::writeSymbology ( QDomNode &node, QDomDocument &doc, QString &, const QgsReadWriteContext &context , QgsMapLayer::StyleCategories categories ) const
444
444
{
445
445
QGIS_PROTECT_QOBJECT_THREAD_ACCESS
446
446
447
+ QDomElement layerElement = node.toElement ();
448
+ writeCommonStyle ( layerElement, doc, context, categories );
449
+
447
450
// add the layer opacity
448
451
if ( categories.testFlag ( Rendering ) )
449
452
{
@@ -470,10 +473,13 @@ bool QgsAnnotationLayer::writeSymbology( QDomNode &node, QDomDocument &doc, QStr
470
473
return true ;
471
474
}
472
475
473
- bool QgsAnnotationLayer::readSymbology ( const QDomNode &node, QString &, QgsReadWriteContext &, QgsMapLayer::StyleCategories categories )
476
+ bool QgsAnnotationLayer::readSymbology ( const QDomNode &node, QString &, QgsReadWriteContext &context , QgsMapLayer::StyleCategories categories )
474
477
{
475
478
QGIS_PROTECT_QOBJECT_THREAD_ACCESS
476
479
480
+ const QDomElement layerElement = node.toElement ();
481
+ readCommonStyle ( layerElement, context, categories );
482
+
477
483
if ( categories.testFlag ( Rendering ) )
478
484
{
479
485
const QDomNode layerOpacityNode = node.namedItem ( QStringLiteral ( " layerOpacity" ) );
0 commit comments