mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
[TabsOnTop] Fixed flickering when closing tab.
It only occured when closing tab and going to tab that hasn't been loaded yet (don't load tabs until selected)
This commit is contained in:
parent
0133886b06
commit
38c4d347c9
|
@ -30,6 +30,7 @@
|
|||
#include <QWebFrame>
|
||||
#include <QLabel>
|
||||
#include <QStyle>
|
||||
#include <QTimer>
|
||||
|
||||
WebTab::SavedTab::SavedTab(WebTab* webTab)
|
||||
{
|
||||
|
@ -110,9 +111,7 @@ TabbedWebView* WebTab::view() const
|
|||
void WebTab::setCurrentTab()
|
||||
{
|
||||
if (!isRestored()) {
|
||||
p_restoreTab(m_savedTab);
|
||||
|
||||
m_savedTab.clear();
|
||||
QTimer::singleShot(0, this, SLOT(slotRestore()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -305,6 +304,12 @@ void WebTab::showNotification(QWidget* notif)
|
|||
notif->show();
|
||||
}
|
||||
|
||||
void WebTab::slotRestore()
|
||||
{
|
||||
p_restoreTab(m_savedTab);
|
||||
m_savedTab.clear();
|
||||
}
|
||||
|
||||
int WebTab::tabIndex() const
|
||||
{
|
||||
return m_view->tabIndex();
|
||||
|
|
|
@ -98,6 +98,7 @@ public:
|
|||
|
||||
private slots:
|
||||
void showNotification(QWidget* notif);
|
||||
void slotRestore();
|
||||
|
||||
private:
|
||||
QupZilla* p_QupZilla;
|
||||
|
|
Loading…
Reference in New Issue
Block a user