Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Variable rename (get rid of "my" prefix)
  • Loading branch information
elpaso committed Nov 5, 2018
1 parent 326640d commit acb6f42
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/core/qgsproject.cpp
Expand Up @@ -925,26 +925,25 @@ bool QgsProject::addLayer( const QDomElement &layerElem, QList<QDomNode> &broken
if ( !mapLayer )
{
QgsDebugMsg( QStringLiteral( "Unable to create layer" ) );

return false;
}

Q_CHECK_PTR( mapLayer ); // NOLINT

// have the layer restore state that is stored in Dom node
bool layerIsValid = mapLayer->readLayerXml( layerElem, context ) && mapLayer->isValid();
QList<QgsMapLayer *> myLayers;
myLayers << mapLayer;
QList<QgsMapLayer *> newLayers;
newLayers << mapLayer;
if ( layerIsValid )
{
emit readMapLayer( mapLayer, layerElem );
addMapLayers( myLayers );
addMapLayers( newLayers );
}
else
{
// It's a bad layer: do not add to legend (the user will decide if she wants to do so)
addMapLayers( myLayers, false );
myLayers.first();
addMapLayers( newLayers, false );
newLayers.first();
QgsDebugMsg( "Unable to load " + type + " layer" );
brokenNodes.push_back( layerElem );
}
Expand Down

0 comments on commit acb6f42

Please sign in to comment.