┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinmainwindow.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2007-05-17 13:29:13 +0000
committerPeter Penz <[email protected]>2007-05-17 13:29:13 +0000
commitc35843f38c596eda4a9b04ba4c6a3247f3bdebc9 (patch)
tree171e3551dd40fa80c41af4c4cd57e8c1810385c4 /src/dolphinmainwindow.cpp
parent8e4e7ce5b248026d941fc4097cbd92032ef53b19 (diff)
when the column view is used, then 'Split view' should take the root URL of the column view as new base for the secondary view
svn path=/trunk/KDE/kdebase/apps/; revision=665630
Diffstat (limited to 'src/dolphinmainwindow.cpp')
-rw-r--r--src/dolphinmainwindow.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index ffe1c4e8e..5b7fde6ce 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -207,11 +207,18 @@ void DolphinMainWindow::rename(const KUrl& oldUrl, const KUrl& newUrl)
void DolphinMainWindow::refreshViews()
{
Q_ASSERT(m_view[PrimaryIdx] != 0);
- m_view[PrimaryIdx]->refresh();
+ // remember the current active view, as because of
+ // the refreshing the active view might change to
+ // the secondary view
+ DolphinView* activeView = m_activeView;
+
+ m_view[PrimaryIdx]->refresh();
if (m_view[SecondaryIdx] != 0) {
m_view[SecondaryIdx]->refresh();
}
+
+ setActiveView(activeView);
}
void DolphinMainWindow::changeUrl(const KUrl& url)
@@ -729,11 +736,11 @@ void DolphinMainWindow::toggleSplitView()
// create a secondary view
m_view[SecondaryIdx] = new DolphinView(this,
0,
- m_view[PrimaryIdx]->url(),
+ m_view[PrimaryIdx]->rootUrl(),
m_view[PrimaryIdx]->mode(),
m_view[PrimaryIdx]->showHiddenFiles());
connectViewSignals(SecondaryIdx);
- m_splitter->insertWidget(0, m_view[SecondaryIdx]);
+ m_splitter->addWidget(m_view[SecondaryIdx]);
m_splitter->setSizes(QList<int>() << newWidth << newWidth);
m_view[SecondaryIdx]->reload();
m_view[SecondaryIdx]->show();
@@ -743,7 +750,6 @@ void DolphinMainWindow::toggleSplitView()
m_view[SecondaryIdx]->close();
m_view[SecondaryIdx]->deleteLater();
m_view[SecondaryIdx] = 0;
- setActiveView(m_view[PrimaryIdx]);
} else {
// The secondary view is active, hence from the users point of view
// the content of the secondary view should be moved to the primary view.
@@ -753,9 +759,9 @@ void DolphinMainWindow::toggleSplitView()
delete m_view[PrimaryIdx];
m_view[PrimaryIdx] = m_view[SecondaryIdx];
m_view[SecondaryIdx] = 0;
- setActiveView(m_view[PrimaryIdx]);
}
}
+ setActiveView(m_view[PrimaryIdx]);
emit activeViewChanged();
}