Skip to content
Permalink
Browse files

Fix check condition for layer style restore

  • Loading branch information
elpaso committed Nov 2, 2018
1 parent 4481127 commit 70d9b6ca439f7a61e828d6166114584da7f99cb7
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/app/qgisapp.cpp
@@ -6955,7 +6955,7 @@ void QgisApp::changeDataSource( QgsMapLayer *layer )
bool layerIsValid( layer->isValid() );
layer->setDataSource( uri.uri, layer->name(), uri.providerKey, QgsDataProvider::ProviderOptions() );
// Re-apply style
if ( !( layerIsValid && layer->originalXmlProperties().isEmpty() ) )
if ( !( layerIsValid || layer->originalXmlProperties().isEmpty() ) )
{
QgsReadWriteContext context;
context.setPathResolver( QgsProject::instance()->pathResolver() );

0 comments on commit 70d9b6c

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