Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[map themes] avoid writing empty style to layer
- Loading branch information
Showing
with
5 additions
and
0 deletions.
-
+5
−0
src/core/qgsmaplayerstylemanager.cpp
|
@@ -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 ) ) |
|
|
{ |
|
|