Commit 052e5fa6 authored by Jörg Schummer's avatar Jörg Schummer Committed by Kai Koehne
Browse files

QmlDesigner.ItemLibrary: Resources view is now updated when switching files

Task-number: BAUHAUS-599
parent d6df0907
......@@ -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());
......
......@@ -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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment