Skip to content

Commit

Permalink
Do not preload providers when DontResolveLayers flag is used
Browse files Browse the repository at this point in the history
By a mistake, even when DontResolveLayers flag was used when reading
a project file, providers that support parallel loading would still
get created. This commit fixes that - they will not get created anymore.
  • Loading branch information
wonder-sk committed Oct 22, 2024
1 parent fe9d59c commit 8f15876
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/project/qgsproject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1509,7 +1509,8 @@ bool QgsProject::_getMapLayers( const QDomDocument &doc, QList<QDomNode> &broken
QVector<QDomNode> parallelLoading;
QMap<QString, QgsDataProvider *> loadedProviders;

if ( QgsSettingsRegistryCore::settingsLayerParallelLoading->value() )
if ( !( flags & Qgis::ProjectReadFlag::DontResolveLayers ) &&
QgsSettingsRegistryCore::settingsLayerParallelLoading->value() )
{
profile.switchTask( tr( "Load providers in parallel" ) );
for ( const QDomNode &node : sortedLayerNodes )
Expand Down

0 comments on commit 8f15876

Please sign in to comment.