Skip to content
This repository has been archived by the owner on May 10, 2018. It is now read-only.

Commit

Permalink
WebTab: Fix pinning tabs that are not yet restored
Browse files Browse the repository at this point in the history
  • Loading branch information
nowrep committed Oct 5, 2015
1 parent c8400d0 commit 73efdcf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/lib/app/mainapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,10 @@ MainApplication::MainApplication(int &argc, char** argv)
m_restoreManager = new RestoreManager();
if (!m_restoreManager->isValid()) {
destroyRestoreManager();
} else {
// Pinned tabs are saved into session.dat, so remove the old saved pinned tabs
QFile::remove(DataPaths::currentProfilePath() + QL1S("/pinnedtabs.dat"));
}

// Pinned tabs are saved into session.dat, so remove the old saved pinned tabs
QFile::remove(DataPaths::currentProfilePath() + QL1S("/pinnedtabs.dat"));
}
}

Expand Down
5 changes: 3 additions & 2 deletions src/lib/webtab/webtab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,9 @@ void WebTab::restoreTab(const WebTab::SavedTab &tab)
{
Q_ASSERT(m_tabBar);

if (!tab.isPinned && qzSettings->loadTabsOnActivation) {
m_isPinned = tab.isPinned;

if (!m_isPinned && qzSettings->loadTabsOnActivation) {
m_savedTab = tab;
int index = tabIndex();

Expand Down Expand Up @@ -324,7 +326,6 @@ void WebTab::p_restoreTab(const QUrl &url, const QByteArray &history)
void WebTab::p_restoreTab(const WebTab::SavedTab &tab)
{
p_restoreTab(tab.url, tab.history);
m_isPinned = tab.isPinned;
}

QPixmap WebTab::renderTabPreview()
Expand Down

0 comments on commit 73efdcf

Please sign in to comment.