1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

TabWidget: Fix saving last closed tab with "no quit on closing last tab" option

Closes #2596
This commit is contained in:
David Rosca 2018-02-09 18:05:58 +01:00
parent d363d58014
commit 31e4d5fd5f
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8

View File

@ -485,10 +485,10 @@ void TabWidget::requestCloseTab(int index)
if (count() <= 1) {
// If we are not closing window upon closing last tab, let's just load new-tab-url
if (m_dontCloseWithOneTab) {
if (webView->url() == m_urlOnNewTab) {
// We don't want to accumulate more than one closed tab, if user tries
// to close the last tab multiple times
m_closedTabsManager->takeLastClosedTab();
// We don't want to accumulate more than one closed tab, if user tries
// to close the last tab multiple times
if (webView->url() != m_urlOnNewTab) {
m_closedTabsManager->saveTab(webTab);
}
webView->zoomReset();
webView->load(m_urlOnNewTab);