forked from qt-creator/qt-creator
QmlDesigner.ItemLibrary: Resources view is now updated when switching files
Task-number: BAUHAUS-599
This commit is contained in:
committed by
Kai Koehne
parent
d6df0907b7
commit
052e5fa6ab
@@ -342,6 +342,7 @@ void DesignDocumentController::loadCurrentModel()
|
|||||||
|
|
||||||
m_d->model->attachView(m_d->navigator.data());
|
m_d->model->attachView(m_d->navigator.data());
|
||||||
m_d->itemLibrary->setMetaInfo(m_d->model->metaInfo());
|
m_d->itemLibrary->setMetaInfo(m_d->model->metaInfo());
|
||||||
|
m_d->itemLibrary->setResourcePath(QFileInfo(m_d->fileName).absolutePath());
|
||||||
|
|
||||||
if (!m_d->componentAction) {
|
if (!m_d->componentAction) {
|
||||||
m_d->componentAction = new ComponentAction(m_d->formEditorView->widget());
|
m_d->componentAction = new ComponentAction(m_d->formEditorView->widget());
|
||||||
|
@@ -230,6 +230,7 @@ ItemLibrary::~ItemLibrary()
|
|||||||
void ItemLibrary::setMetaInfo(const MetaInfo &metaInfo)
|
void ItemLibrary::setMetaInfo(const MetaInfo &metaInfo)
|
||||||
{
|
{
|
||||||
m_d->m_itemLibraryModel->update(metaInfo);
|
m_d->m_itemLibraryModel->update(metaInfo);
|
||||||
|
updateSearch();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ItemLibrary::setSearchFilter(const QString &searchFilter)
|
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)
|
if (m_d->m_resourcesView->model() == m_d->m_resourcesDirModel)
|
||||||
m_d->m_resourcesView->setRootIndex(m_d->m_resourcesDirModel->index(resourcePath));
|
m_d->m_resourcesView->setRootIndex(m_d->m_resourcesDirModel->index(resourcePath));
|
||||||
|
updateSearch();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ItemLibrary::startDragAndDrop(int itemLibId)
|
void ItemLibrary::startDragAndDrop(int itemLibId)
|
||||||
|
Reference in New Issue
Block a user