diff --git a/src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp b/src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp index c3116af6b74f39fe806b89e048765946f11b9938..b06cd8f7c59a17bf1097fed1a9fc21fcbc16a427 100644 --- a/src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp +++ b/src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp @@ -342,6 +342,7 @@ void DesignDocumentController::loadCurrentModel() m_d->model->attachView(m_d->navigator.data()); m_d->itemLibrary->setMetaInfo(m_d->model->metaInfo()); + m_d->itemLibrary->setResourcePath(QFileInfo(m_d->fileName).absolutePath()); if (!m_d->componentAction) { m_d->componentAction = new ComponentAction(m_d->formEditorView->widget()); diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrary.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibrary.cpp index e28ef88f45d4e911012d65018446ff1187fa92af..b6a6872da640d4badd6add8edc8d40b44ac30bff 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrary.cpp +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrary.cpp @@ -230,6 +230,7 @@ ItemLibrary::~ItemLibrary() void ItemLibrary::setMetaInfo(const MetaInfo &metaInfo) { m_d->m_itemLibraryModel->update(metaInfo); + updateSearch(); } void ItemLibrary::setSearchFilter(const QString &searchFilter) @@ -269,6 +270,7 @@ void ItemLibrary::setResourcePath(const QString &resourcePath) { if (m_d->m_resourcesView->model() == m_d->m_resourcesDirModel) m_d->m_resourcesView->setRootIndex(m_d->m_resourcesDirModel->index(resourcePath)); + updateSearch(); } void ItemLibrary::startDragAndDrop(int itemLibId)