diff --git a/src/webview/tabwidget.cpp b/src/webview/tabwidget.cpp index b9083b64f..c24f435c1 100644 --- a/src/webview/tabwidget.cpp +++ b/src/webview/tabwidget.cpp @@ -376,7 +376,6 @@ void TabWidget::currentTabChanged(int index) } p_QupZilla->setWindowTitle(title + " - QupZilla"); -// p_QupZilla->locationBar()->showUrl(weView()->url(),false); if (m_locationBars->indexOf(locBar) != -1) { m_locationBars->setCurrentWidget(locBar); @@ -554,7 +553,7 @@ void TabWidget::restorePinnedTabs() QByteArray historyState = tabHistory.value(i); int addedIndex; if (!historyState.isEmpty()) { - addedIndex = addView(QUrl()); + addedIndex = addView(QUrl(), tr("New tab"), CleanPage); QDataStream historyStream(historyState); historyStream >> *weView(addedIndex)->history(); weView(addedIndex)->load(url); @@ -568,8 +567,8 @@ void TabWidget::restorePinnedTabs() emit pinnedTabAdded(); } + m_tabBar->updateCloseButton(addedIndex); m_tabBar->moveTab(addedIndex, i); - m_tabBar->updateCloseButton(i); } } @@ -630,7 +629,7 @@ bool TabWidget::restoreState(const QByteArray &state) QByteArray historyState = tabHistory.value(i); if (!historyState.isEmpty()) { - int index = addView(QUrl()); + int index = addView(QUrl(), tr("New tab"), CleanPage); QDataStream historyStream(historyState); historyStream >> *weView(index)->history(); weView(index)->load(url);