m_filterBar(0),
m_statusBar(0),
m_dirLister(0),
- m_proxyModel(0)
+ m_proxyModel(0),
+ m_previousUrl(),
+ m_currentUrl()
{
hide();
m_dirLister = 0; // deleted by m_dolphinModel
}
-void DolphinViewContainer::setUrl(const KUrl& url)
+void DolphinViewContainer::setUrl(const KUrl& newUrl)
{
- m_urlNavigator->setUrl(url);
+ if (newUrl != m_currentUrl) {
+ m_previousUrl = m_currentUrl;
+ m_currentUrl = newUrl;
+ m_urlNavigator->setUrl(newUrl);
+ }
}
const KUrl& DolphinViewContainer::url() const
{
- return m_urlNavigator->url();
+ return m_currentUrl;
}
void DolphinViewContainer::setActive(bool active)
return m_urlNavigator->isUrlEditable();
}
-KFileItem DolphinViewContainer::fileItem(const QModelIndex& index) const
-{
- const QModelIndex dolphinModelIndex = m_proxyModel->mapToSource(index);
- return m_dolphinModel->itemForIndex(dolphinModelIndex);
-}
-
void DolphinViewContainer::updateProgress(int percent)
{
if (!m_showProgress) {
}
updateStatusBar();
-
+ m_view->setCurrentItem(m_previousUrl);
QTimer::singleShot(100, this, SLOT(restoreContentsPos()));
}