diff --git a/src/lib/tabwidget/tabwidget.cpp b/src/lib/tabwidget/tabwidget.cpp index 9f80970bc..77b40aefd 100644 --- a/src/lib/tabwidget/tabwidget.cpp +++ b/src/lib/tabwidget/tabwidget.cpp @@ -425,13 +425,9 @@ void TabWidget::closeTab(int index) if (!webTab || !validIndex(index)) return; + m_closedTabsManager->saveTab(webTab); + TabbedWebView *webView = webTab->webView(); - - // Save tab url and history - if (webView->url().toString() != QL1S("falkon:restore")) { - m_closedTabsManager->saveTab(webTab); - } - m_locationBars->removeWidget(webView->webTab()->locationBar()); disconnect(webView, SIGNAL(wantsCloseTab(int)), this, SLOT(closeTab(int))); disconnect(webView, SIGNAL(urlChanged(QUrl)), this, SIGNAL(changed())); diff --git a/src/lib/tools/closedtabsmanager.cpp b/src/lib/tools/closedtabsmanager.cpp index 0bef7594c..b4395b020 100644 --- a/src/lib/tools/closedtabsmanager.cpp +++ b/src/lib/tools/closedtabsmanager.cpp @@ -36,6 +36,11 @@ void ClosedTabsManager::saveTab(WebTab *tab) return; } + // Don't save restore tab + if (tab->url().toString() == QL1S("qupzilla:restore")) { + return; + } + Tab closedTab; closedTab.position = tab->tabIndex(); closedTab.tabState = WebTab::SavedTab(tab);