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 nyalldawson committed May 18, 2023
1 parent 0dec559 commit c4ac8c6
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/app/qgisapp.cpp
Expand Up @@ -6297,13 +6297,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 c4ac8c6

Please sign in to comment.