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 ae75745 commit eeb7820
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/app/qgisapp.cpp
Expand Up @@ -6468,13 +6468,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 eeb7820

Please sign in to comment.