Skip to content
Permalink
Browse files
Update src/core/qgsmaplayermodel.cpp
  • Loading branch information
nyalldawson committed Jan 7, 2022
1 parent bb773d0 commit e078e265737c256a58064d9c0fa76d1f93993ff1
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/qgsmaplayermodel.cpp
@@ -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 );

0 comments on commit e078e26

Please sign in to comment.