diff options
| author | Emmanuel Pescosta <[email protected]> | 2014-08-10 20:36:44 +0200 |
|---|---|---|
| committer | Emmanuel Pescosta <[email protected]> | 2014-08-13 20:50:36 +0200 |
| commit | 62418c58a58fac668e713655552b1c614b226298 (patch) | |
| tree | 33997f4913c95c8a6dd2bd10a1cf3acb02439eee /src/dolphintabwidget.cpp | |
| parent | 4b70446c17dff6646c11966670bcbe145d07c685 (diff) | |
Use DolphinTabPage saveState/restoreState to remember and re-open closed tabs.
REVIEW: 118968
Diffstat (limited to 'src/dolphintabwidget.cpp')
| -rw-r--r-- | src/dolphintabwidget.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/dolphintabwidget.cpp b/src/dolphintabwidget.cpp index 4bb70b4ea..ea71b4856 100644 --- a/src/dolphintabwidget.cpp +++ b/src/dolphintabwidget.cpp @@ -213,12 +213,7 @@ void DolphinTabWidget::closeTab(const int index) } DolphinTabPage* tabPage = tabPageAt(index); - if (tabPage->splitViewEnabled()) { - emit rememberClosedTab(tabPage->primaryViewContainer()->url(), - tabPage->secondaryViewContainer()->url()); - } else { - emit rememberClosedTab(tabPage->primaryViewContainer()->url(), KUrl()); - } + emit rememberClosedTab(tabPage->activeViewContainer()->url(), tabPage->saveState()); removeTab(index); tabPage->deleteLater(); @@ -249,6 +244,12 @@ void DolphinTabWidget::slotPlacesPanelVisibilityChanged(bool visible) } } +void DolphinTabWidget::restoreClosedTab(const QByteArray& state) +{ + openNewActivatedTab(); + currentTabPage()->restoreState(state); +} + void DolphinTabWidget::detachTab(int index) { Q_ASSERT(index >= 0); |
