1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +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:
nowrep 2013-02-11 09:51:22 +01:00
parent 0133886b06
commit 38c4d347c9
2 changed files with 9 additions and 3 deletions

View File

@ -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();

View File

@ -98,6 +98,7 @@ public:
private slots:
void showNotification(QWidget* notif);
void slotRestore();
private:
QupZilla* p_QupZilla;