mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
Fix restoring non-loaded tabs when moving them.
This commit is contained in:
parent
f041d87534
commit
04b288b395
|
@ -507,6 +507,8 @@ void TabWidget::currentTabChanged(int index)
|
|||
m_currentTabFresh = false;
|
||||
|
||||
WebTab* webTab = weTab(index);
|
||||
webTab->tabActivated();
|
||||
|
||||
LocationBar* locBar = webTab->locationBar();
|
||||
|
||||
if (locBar && m_locationBars->indexOf(locBar) != -1) {
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
#include <QTimer>
|
||||
#include <QSplitter>
|
||||
|
||||
bool WebTab::s_pinningTab = false;
|
||||
static const int savedTabVersion = 3;
|
||||
|
||||
WebTab::SavedTab::SavedTab()
|
||||
|
@ -474,11 +473,10 @@ void WebTab::slotRestore()
|
|||
m_tabBar->restoreTabTextColor(tabIndex());
|
||||
}
|
||||
|
||||
void WebTab::showEvent(QShowEvent* event)
|
||||
void WebTab::tabActivated()
|
||||
{
|
||||
QWidget::showEvent(event);
|
||||
|
||||
if (!isRestored() && !s_pinningTab) {
|
||||
if (!isRestored()) {
|
||||
// When session is being restored, restore the tab immediately
|
||||
if (mApp->isRestoring()) {
|
||||
slotRestore();
|
||||
|
@ -515,9 +513,5 @@ void WebTab::togglePinned()
|
|||
|
||||
m_isPinned = !m_isPinned;
|
||||
|
||||
// Workaround bug in TabStackedWidget when pinning tab, other tabs may be accidentaly
|
||||
// shown and restored state even when they won't be switched to by user.
|
||||
s_pinningTab = true;
|
||||
m_window->tabWidget()->pinUnPinTab(tabIndex(), title());
|
||||
s_pinningTab = false;
|
||||
}
|
||||
|
|
|
@ -102,6 +102,8 @@ public:
|
|||
void p_restoreTab(const SavedTab &tab);
|
||||
void p_restoreTab(const QUrl &url, const QByteArray &history, int zoomLevel);
|
||||
|
||||
void tabActivated();
|
||||
|
||||
private slots:
|
||||
void showNotification(QWidget* notif);
|
||||
void loadStarted();
|
||||
|
@ -111,7 +113,6 @@ private slots:
|
|||
void slotRestore();
|
||||
|
||||
private:
|
||||
void showEvent(QShowEvent* event);
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
|
||||
BrowserWindow* m_window;
|
||||
|
@ -128,7 +129,6 @@ private:
|
|||
SavedTab m_savedTab;
|
||||
bool m_isPinned;
|
||||
|
||||
static bool s_pinningTab;
|
||||
};
|
||||
|
||||
#endif // WEBTAB_H
|
||||
|
|
Loading…
Reference in New Issue
Block a user