Skip to content
Permalink
Browse files

Do not bail out from reading the layer xml if layer is not valid

  • Loading branch information
elpaso committed Oct 20, 2018
1 parent 7a0faed commit 670c31b0598a171ed882b9d986af6db88b4752d8
Showing with 1 addition and 7 deletions.
  1. +1 −7 src/core/qgsmaplayer.cpp
@@ -283,12 +283,6 @@ bool QgsMapLayer::readLayerXml( const QDomElement &layerElement, QgsReadWriteCon
QgsCoordinateReferenceSystem::setCustomCrsValidation( savedValidation );
mCRS = savedCRS;

// Abort if any error in layer, such as not found.
if ( layerError )
{
return false;
}

// the internal name is just the data source basename
//QFileInfo dataSourceFileInfo( mDataSource );
//internalName = dataSourceFileInfo.baseName();
@@ -387,7 +381,7 @@ bool QgsMapLayer::readLayerXml( const QDomElement &layerElement, QgsReadWriteCon
QDomElement metadataElem = layerElement.firstChildElement( QStringLiteral( "resourceMetadata" ) );
mMetadata.readMetadataXml( metadataElem );

return true;
return ! layerError;
} // bool QgsMapLayer::readLayerXML


0 comments on commit 670c31b

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