setModel(m_proxyModel);
new KMimeTypeResolver(this, m_dolphinModel);
- m_iconManager = new IconManager(this, m_dolphinModel);
+ m_iconManager = new IconManager(this, m_proxyModel);
m_iconManager->setShowPreview(m_view->m_controller->dolphinView()->showPreview());
m_dirLister->openUrl(url, KDirLister::NoFlags);
void DolphinColumnWidget::setShowPreview(bool show)
{
- kDebug() << "-------------- column widget: show" << show;
m_iconManager->setShowPreview(show);
m_dirLister->stop();
this, SLOT(triggerItem(const QModelIndex&)));
}
- if (!m_childUrl.isEmpty()) {
- // assure that the current index is set on the index that represents
- // the child URL
- const QModelIndex dirIndex = m_dolphinModel->indexForUrl(m_childUrl);
- const QModelIndex proxyIndex = m_proxyModel->mapFromSource(dirIndex);
- selectionModel()->setCurrentIndex(proxyIndex, QItemSelectionModel::Current);
- }
+ if (selectionModel() && selectionModel()->currentIndex().isValid())
+ selectionModel()->setCurrentIndex(selectionModel()->currentIndex(), QItemSelectionModel::SelectCurrent);
updateBackground();
}
this, SLOT(triggerItem(const QModelIndex&)));
}
+ const QModelIndex current = selectionModel()->currentIndex();
selectionModel()->clear();
+ selectionModel()->setCurrentIndex(current, QItemSelectionModel::NoUpdate);
updateBackground();
}