Skip to content

Commit

Permalink
Do not bail out from reading the layer xml if layer is not valid
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Nov 5, 2018
1 parent 7a0faed commit 670c31b
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/core/qgsmaplayer.cpp
Expand Up @@ -283,12 +283,6 @@ bool QgsMapLayer::readLayerXml( const QDomElement &layerElement, QgsReadWriteCon
QgsCoordinateReferenceSystem::setCustomCrsValidation( savedValidation ); QgsCoordinateReferenceSystem::setCustomCrsValidation( savedValidation );
mCRS = savedCRS; 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 // the internal name is just the data source basename
//QFileInfo dataSourceFileInfo( mDataSource ); //QFileInfo dataSourceFileInfo( mDataSource );
//internalName = dataSourceFileInfo.baseName(); //internalName = dataSourceFileInfo.baseName();
Expand Down Expand Up @@ -387,7 +381,7 @@ bool QgsMapLayer::readLayerXml( const QDomElement &layerElement, QgsReadWriteCon
QDomElement metadataElem = layerElement.firstChildElement( QStringLiteral( "resourceMetadata" ) ); QDomElement metadataElem = layerElement.firstChildElement( QStringLiteral( "resourceMetadata" ) );
mMetadata.readMetadataXml( metadataElem ); mMetadata.readMetadataXml( metadataElem );


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




Expand Down

0 comments on commit 670c31b

Please sign in to comment.