Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add timing to project load: resolve layer deps and set up widgets
  • Loading branch information
wonder-sk authored and github-actions[bot] committed May 18, 2023
1 parent 78bf41f commit e7c8417
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/app/qgisapp.cpp
Expand Up @@ -6413,13 +6413,17 @@ bool QgisApp::addProject( const QString &projectFile )
}
#endif

// Check for missing layer widget dependencies
const auto constVLayers { QgsProject::instance()->layers<QgsVectorLayer *>( ) };
for ( QgsVectorLayer *vl : constVLayers )
{
if ( vl->isValid() )
QgsScopedRuntimeProfile profile( tr( "Resolve vector layer dependencies" ), QStringLiteral( "projectload" ) );

// Check for missing layer widget dependencies
const auto constVLayers { QgsProject::instance()->layers<QgsVectorLayer *>( ) };
for ( QgsVectorLayer *vl : constVLayers )
{
QgsAppLayerHandling::resolveVectorLayerDependencies( vl );
if ( vl->isValid() )
{
QgsAppLayerHandling::resolveVectorLayerDependencies( vl );
}
}
}

Expand Down

0 comments on commit e7c8417

Please sign in to comment.