Commit 51f4bc1b authored by Kai Koehne's avatar Kai Koehne
Browse files

Fix runtime warning

Fix warning "QAbstractItemView::setRootIndex failed : index must
be from the currently set model".
parent cea12384
......@@ -212,7 +212,8 @@ void ItemLibrary::setNameFilter(const QString &nameFilter)
nameFilterList.append(nameFilter + "*.");
m_d->m_resourcesDirModel->setFilter(QDir::AllDirs | QDir::Files | QDir::NoDotAndDotDot);
m_d->m_resourcesDirModel->setNameFilters(nameFilterList);
m_d->m_ui.ItemLibraryTreeView->setRootIndex(m_d->m_resourcesDirModel->index(m_d->m_resourcePath));
if (m_d->m_ui.ItemLibraryTreeView->model() == m_d->m_resourcesDirModel)
m_d->m_ui.ItemLibraryTreeView->setRootIndex(m_d->m_resourcesDirModel->index(m_d->m_resourcePath));
}
void ItemLibrary::itemLibraryButton()
......
Markdown is supported
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