Skip to content

Commit 70d9b6c

Browse files
committedNov 5, 2018
Fix check condition for layer style restore
1 parent 4481127 commit 70d9b6c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/app/qgisapp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6955,7 +6955,7 @@ void QgisApp::changeDataSource( QgsMapLayer *layer )
69556955
bool layerIsValid( layer->isValid() );
69566956
layer->setDataSource( uri.uri, layer->name(), uri.providerKey, QgsDataProvider::ProviderOptions() );
69576957
// Re-apply style
6958-
if ( !( layerIsValid && layer->originalXmlProperties().isEmpty() ) )
6958+
if ( !( layerIsValid || layer->originalXmlProperties().isEmpty() ) )
69596959
{
69606960
QgsReadWriteContext context;
69616961
context.setPathResolver( QgsProject::instance()->pathResolver() );

0 commit comments

Comments
 (0)