diff options
| author | Peter Penz <[email protected]> | 2008-05-20 21:21:48 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2008-05-20 21:21:48 +0000 |
| commit | ed5b2e54736b04d551eae01d976038fb7d5aac35 (patch) | |
| tree | 94bee37d963ce85a62b8000ae0bdbb8aaa7b0973 /src/dolphinviewcontainer.cpp | |
| parent | 0ce69374d96e2b16526b5450d5cc4676bac8b720 (diff) | |
when going back in history apply the keyboard focus to the the previously shown directory
BUG: 156550
BUG: 158590
svn path=/trunk/KDE/kdebase/apps/; revision=810493
Diffstat (limited to 'src/dolphinviewcontainer.cpp')
| -rw-r--r-- | src/dolphinviewcontainer.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp index ae9defc1a..6bc620ee2 100644 --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@ -68,7 +68,9 @@ DolphinViewContainer::DolphinViewContainer(DolphinMainWindow* mainWindow, m_filterBar(0), m_statusBar(0), m_dirLister(0), - m_proxyModel(0) + m_proxyModel(0), + m_previousUrl(), + m_currentUrl() { hide(); @@ -167,14 +169,18 @@ DolphinViewContainer::~DolphinViewContainer() 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) @@ -228,7 +234,7 @@ void DolphinViewContainer::slotDirListerCompleted() } updateStatusBar(); - + m_view->setCurrentItem(m_previousUrl); QTimer::singleShot(100, this, SLOT(restoreContentsPos())); } |
