Skip to content

Commit

Permalink
[map themes] avoid writing empty style to layer
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Jan 20, 2018
1 parent 96d1ea5 commit 02b24a6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/qgsmaplayerstylemanager.cpp
Expand Up @@ -270,6 +270,11 @@ void QgsMapLayerStyle::readFromLayer( QgsMapLayer *layer )

void QgsMapLayerStyle::writeToLayer( QgsMapLayer *layer ) const
{
if ( !isValid() )
{
return;
}

QDomDocument doc( QStringLiteral( "qgis" ) );
if ( !doc.setContent( mXmlData ) )
{
Expand Down

0 comments on commit 02b24a6

Please sign in to comment.