Skip to content

Commit

Permalink
Update src/core/qgsmaplayermodel.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 7, 2022
1 parent bb773d0 commit e078e26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgsmaplayermodel.cpp
Expand Up @@ -51,7 +51,7 @@ void QgsMapLayerModel::setProject( QgsProject *project )
disconnect( mProject, static_cast < void ( QgsProject::* )( const QStringList & ) >( &QgsProject::layersWillBeRemoved ), this, &QgsMapLayerModel::removeLayers );
}

mProject = project;
mProject = project ? project : QgsProject::instance();

connect( mProject, &QgsProject::layersAdded, this, &QgsMapLayerModel::addLayers );
connect( mProject, static_cast < void ( QgsProject::* )( const QStringList & ) >( &QgsProject::layersWillBeRemoved ), this, &QgsMapLayerModel::removeLayers );
Expand Down

0 comments on commit e078e26

Please sign in to comment.