From e54e6a9cdbc0e37e7c81abcea4e69838cddabaa3 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Wed, 28 May 2008 20:40:16 +0000 Subject: Move the code for restoring the current item from DolphinViewContainer to DolphinView, as the DolphinView must be able to do this without advice from the container. Beside that this simplifies the code it also fixes a regression of having empty tabs. svn path=/trunk/KDE/kdebase/apps/; revision=813828 --- src/dolphinviewcontainer.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'src/dolphinviewcontainer.cpp') diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp index 6bc620ee2..7179c5080 100644 --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@ -68,9 +68,7 @@ DolphinViewContainer::DolphinViewContainer(DolphinMainWindow* mainWindow, m_filterBar(0), m_statusBar(0), m_dirLister(0), - m_proxyModel(0), - m_previousUrl(), - m_currentUrl() + m_proxyModel(0) { hide(); @@ -171,16 +169,12 @@ DolphinViewContainer::~DolphinViewContainer() void DolphinViewContainer::setUrl(const KUrl& newUrl) { - if (newUrl != m_currentUrl) { - m_previousUrl = m_currentUrl; - m_currentUrl = newUrl; - m_urlNavigator->setUrl(newUrl); - } + m_urlNavigator->setUrl(newUrl); } const KUrl& DolphinViewContainer::url() const { - return m_currentUrl; + return m_urlNavigator->url(); } void DolphinViewContainer::setActive(bool active) @@ -234,7 +228,6 @@ void DolphinViewContainer::slotDirListerCompleted() } updateStatusBar(); - m_view->setCurrentItem(m_previousUrl); QTimer::singleShot(100, this, SLOT(restoreContentsPos())); } -- cgit v1.3