Skip to content

Commit

Permalink
Merge pull request #40420 from elpaso/nanoptimize-dont-detach-loop
Browse files Browse the repository at this point in the history
Do not detach layers loop
  • Loading branch information
elpaso committed Dec 3, 2020
2 parents 45e5ce0 + 8d2d5b6 commit 74444d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgsproject.cpp
Expand Up @@ -2004,7 +2004,7 @@ void QgsProject::onMapLayersAdded( const QList<QgsMapLayer *> &layers )
connect( layer, &QgsMapLayer::configChanged, this, [ = ] { setDirty(); } );

// check if we have to update connections for layers with dependencies
for ( QMap<QString, QgsMapLayer *>::iterator it = existingMaps.begin(); it != existingMaps.end(); ++it )
for ( QMap<QString, QgsMapLayer *>::const_iterator it = existingMaps.cbegin(); it != existingMaps.cend(); ++it )
{
QSet<QgsMapLayerDependency> deps = it.value()->dependencies();
if ( deps.contains( layer->id() ) )
Expand Down

0 comments on commit 74444d3

Please sign in to comment.