Skip to content
Permalink
Browse files

Variable rename (get rid of "my" prefix)

  • Loading branch information
elpaso committed Oct 30, 2018
1 parent 326640d commit acb6f42d605f977fb6e7c3b23598dc67c9e88e71
Showing with 5 additions and 6 deletions.
  1. +5 −6 src/core/qgsproject.cpp
@@ -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 );
}

0 comments on commit acb6f42

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