diff options
| author | Peter Penz <[email protected]> | 2007-03-03 13:03:15 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2007-03-03 13:03:15 +0000 |
| commit | e26ba53471ea902d18e59a4a8fc52ccdf4c7b4ea (patch) | |
| tree | cf7c1a59eb528c87c3135a4f02171c7c85e33c8e /src/treeviewsidebarpage.cpp | |
| parent | 9d24c28b4ba3ac62b698a53925f9747850959d63 (diff) | |
Assure that the root of the tree view always matchs to the bookmark shown in the URL navigator.
svn path=/trunk/KDE/kdebase/apps/; revision=638825
Diffstat (limited to 'src/treeviewsidebarpage.cpp')
| -rw-r--r-- | src/treeviewsidebarpage.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/treeviewsidebarpage.cpp b/src/treeviewsidebarpage.cpp index f57146684..32edef05e 100644 --- a/src/treeviewsidebarpage.cpp +++ b/src/treeviewsidebarpage.cpp @@ -19,6 +19,7 @@ #include "treeviewsidebarpage.h" +#include "bookmarkselector.h" #include "dolphinmainwindow.h" #include "dolphinview.h" @@ -76,12 +77,20 @@ void TreeViewSidebarPage::activeViewChanged() void TreeViewSidebarPage::updatePosition(const KUrl& url) { + KUrl baseUrl = BookmarkSelector::baseBookmark(url).url(); + if (m_dirLister->url() != baseUrl) { + m_dirLister->stop(); + m_dirLister->openUrl(baseUrl); + } + + // TODO: open sub folders to be synchronous to 'url' } void TreeViewSidebarPage::connectToActiveView() { DolphinView* view = mainWindow()->activeView(); - m_dirLister->openUrl(view->url(), true); + m_dirLister->stop(); + m_dirLister->openUrl(view->url()); connect(view, SIGNAL(urlChanged(const KUrl&)), this, SLOT(updatePosition(const KUrl&))); } |
