From d3f2394e8f9b7b1453e8756fe03f4d3bfaa715c1 Mon Sep 17 00:00:00 2001 From: Mahmoud Badri Date: Tue, 13 Apr 2021 14:15:34 +0300 Subject: [PATCH] QmlDesigner: Don't update sub component manager when adding a module It seems there is no need to update it and it is an expensive operation. Task-number: QDS-4008 Change-Id: I5dd8427f73a6ce755b017f6d284b72acb31ed7d5 Reviewed-by: Thomas Hartmann --- .../qmldesigner/components/itemlibrary/itemlibrarywidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp index 818553404d5..5b59284663e 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp @@ -292,7 +292,7 @@ void ItemLibraryWidget::handleAddImport(int index) } m_model->changeImports({import}, {}); - QmlDesignerPlugin::instance()->currentDesignDocument()->updateSubcomponentManager(); + m_stackedWidget->setCurrentIndex(0); // switch to the Components view after import is added updateSearch(); }