Added restoration of blank tab

Blank tab is now being tracked for tab restoration on startup.
This commit is contained in:
ShaopengLin 2024-06-16 17:03:16 -04:00
parent a179749d03
commit 60cc7f1dde
2 changed files with 5 additions and 1 deletions

View File

@ -207,6 +207,9 @@ void KiwixApp::restoreTabs()
{
for (const auto &zimUrl : tabsToOpen)
{
if (zimUrl.isEmpty())
getTabWidget()->createNewTab(true, true);
else
openUrl(QUrl(zimUrl));
}
}

View File

@ -163,6 +163,7 @@ ZimView* TabBar::createNewTab(bool setCurrent, bool nextToCurrentTab)
connect(tab, &ZimView::webActionEnabledChanged,
this, &TabBar::onWebviewHistoryActionChanged);
KiwixApp::instance()->saveListOfOpenTabs();
return tab;
}