Skip to content

Commit

Permalink
Do not detach layers loop
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Dec 3, 2020
1 parent 2ae67ce commit 8d2d5b6
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 8d2d5b6

Please sign in to comment.