Skip to content

Commit 670c31b

Browse files
committedNov 5, 2018
Do not bail out from reading the layer xml if layer is not valid
1 parent 7a0faed commit 670c31b

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed
 

‎src/core/qgsmaplayer.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -283,12 +283,6 @@ bool QgsMapLayer::readLayerXml( const QDomElement &layerElement, QgsReadWriteCon
283283
QgsCoordinateReferenceSystem::setCustomCrsValidation( savedValidation );
284284
mCRS = savedCRS;
285285

286-
// Abort if any error in layer, such as not found.
287-
if ( layerError )
288-
{
289-
return false;
290-
}
291-
292286
// the internal name is just the data source basename
293287
//QFileInfo dataSourceFileInfo( mDataSource );
294288
//internalName = dataSourceFileInfo.baseName();
@@ -387,7 +381,7 @@ bool QgsMapLayer::readLayerXml( const QDomElement &layerElement, QgsReadWriteCon
387381
QDomElement metadataElem = layerElement.firstChildElement( QStringLiteral( "resourceMetadata" ) );
388382
mMetadata.readMetadataXml( metadataElem );
389383

390-
return true;
384+
return ! layerError;
391385
} // bool QgsMapLayer::readLayerXML
392386

393387

0 commit comments

Comments
 (0)
Please sign in to comment.