1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

Fixed setting current tab after recovering crash.

It set currentIndex - 1 before.
This commit is contained in:
nowrep 2013-01-25 23:36:50 +01:00
parent 359e1842a0
commit 3cdb4c26df

View File

@ -970,7 +970,13 @@ bool MainApplication::restoreStateSlot(QupZilla* window, RestoreData recoveryDat
newWin->restoreWindowState(recoveryData.takeFirst());
}
else {
window->restoreWindowState(recoveryData.takeFirst());
// QTabWidget::count() - count of tabs is not updated after closing
// recovery tab ...
int tabCount = window->tabWidget()->count();
RestoreManager::WindowData data = recoveryData.takeFirst();
data.currentTab += tabCount;
window->restoreWindowState(data);
}
foreach(const RestoreManager::WindowData & data, recoveryData) {