mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
Don't close additionally opened tabs when restoring session
- if user opens app after crash, he will get 1 tab asking him about restoring a session if user opens another tabs and later decides to restore session, new opened tabs won't be closed Patch by Franz Fellner
This commit is contained in:
parent
80e89b2644
commit
c6445513e0
@ -864,7 +864,7 @@ bool MainApplication::saveStateSlot()
|
||||
return true;
|
||||
}
|
||||
|
||||
bool MainApplication::restoreStateSlot(QupZilla* window, const RestoreData &recoveryData)
|
||||
bool MainApplication::restoreStateSlot(QupZilla* win, const RestoreData &recoveryData)
|
||||
{
|
||||
if (m_isPrivateSession) {
|
||||
return false;
|
||||
@ -878,6 +878,14 @@ bool MainApplication::restoreStateSlot(QupZilla* window, const RestoreData &reco
|
||||
return false;
|
||||
}
|
||||
|
||||
QupZilla* window = win;
|
||||
|
||||
if (window->tabWidget()->count() > 1) {
|
||||
window = new QupZilla(Qz::BW_OtherRestoredWindow);
|
||||
m_mainWindows.append(window);
|
||||
}
|
||||
win->tabWidget()->closeTab(window->tabWidget()->currentIndex(), true);
|
||||
|
||||
int windowCount = recoveryData.size();
|
||||
int currentWindow = 0;
|
||||
|
||||
|
@ -784,11 +784,6 @@ bool TabWidget::restoreState(const QList<WebTab::SavedTab> &tabs, int currentTab
|
||||
{
|
||||
m_isRestoringState = true;
|
||||
|
||||
foreach(WebTab * tab, allTabs()) {
|
||||
int tabIndex = tab->tabIndex();
|
||||
closeTab(tabIndex, true);
|
||||
}
|
||||
|
||||
for (int i = 0; i < tabs.size(); ++i) {
|
||||
WebTab::SavedTab tab = tabs.at(i);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user