Skip to content

Commit

Permalink
Fix read/write of style manager in vector tile layer (fixes #36018)
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk authored and nyalldawson committed Jun 8, 2020
1 parent f8d2951 commit 44046d7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/core/vectortile/qgsvectortilelayer.cpp
Expand Up @@ -128,14 +128,20 @@ bool QgsVectorTileLayer::readXml( const QDomNode &layerNode, QgsReadWriteContext
mValid = loadDataSource();

QString errorMsg;
return readSymbology( layerNode, errorMsg, context );
if ( !readSymbology( layerNode, errorMsg, context ) )
return false;

readStyleManager( layerNode );
return true;
}

bool QgsVectorTileLayer::writeXml( QDomNode &layerNode, QDomDocument &doc, const QgsReadWriteContext &context ) const
{
QDomElement mapLayerNode = layerNode.toElement();
mapLayerNode.setAttribute( QStringLiteral( "type" ), QStringLiteral( "vector-tile" ) );

writeStyleManager( layerNode, doc );

QString errorMsg;
return writeSymbology( layerNode, doc, errorMsg, context );
}
Expand Down

0 comments on commit 44046d7

Please sign in to comment.