Skip to content
Permalink
Browse files

clear datadefined server properties if empty xml

  • Loading branch information
signedav committed May 15, 2020
1 parent 550ee2c commit fa11fa80690c8a01c6f2864f2ea1ae9233a5268e
Showing with 6 additions and 8 deletions.
  1. +6 −8 src/core/qgsproject.cpp
@@ -920,16 +920,14 @@ Restore the data defined server properties collection found in "doc" to "dataDef
void _getDataDefinedServerProperties( const QDomDocument &doc, QgsPropertyCollection &dataDefinedServerProperties, const QgsPropertiesDefinition &dataDefinedServerPropertyDefinitions )
{
// Read data defined server properties
dataDefinedServerProperties.clear();
QDomElement ddElem = doc.documentElement().firstChildElement( QStringLiteral( "dataDefinedServerProperties" ) );

if ( ddElem.isNull() ) // no properties found, so we're done
if ( !ddElem.isNull() )
{
return;
}

if ( ! dataDefinedServerProperties.readXml( ddElem, dataDefinedServerPropertyDefinitions ) )
{
QgsDebugMsg( QStringLiteral( "dataDefinedServerProperties.readXml() failed" ) );
if ( !dataDefinedServerProperties.readXml( ddElem, dataDefinedServerPropertyDefinitions ) )
{
QgsDebugMsg( QStringLiteral( "dataDefinedServerProperties.readXml() failed" ) );
}
}
}

0 comments on commit fa11fa8

Please sign in to comment.
You can’t perform that action at this time.