QmlDesigner: Optimize adding QtQuick3D and asset imports

Update subcomponentmanager only for the needed imports when:
- Adding the QtQuick3D import via the link in the 3D editor.
- Adding 3D asset using the assets importer.

Also few renamings to make things clearer.

Change-Id: I4eb55f64307498f3dbb400e947667dfe9e42ff8e
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Mahmoud Badri
2021-04-20 22:59:26 +03:00
parent 32538c8a2d
commit 767ce26ef2
4 changed files with 69 additions and 42 deletions

View File

@@ -319,7 +319,8 @@ void Edit3DView::addQuick3DImport()
model()->changeImports({import}, {});
// Subcomponent manager update needed to make item library entries appear
QmlDesignerPlugin::instance()->currentDesignDocument()->updateSubcomponentManager();
QmlDesignerPlugin::instance()->currentDesignDocument()
->updateSubcomponentManagerImport(import);
return;
}
}