summaryrefslogtreecommitdiff
path: root/qutebrowser/misc/sessions.py
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2020-09-14 14:51:54 +0200
committerFlorian Bruhin <me@the-compiler.org>2020-09-14 14:51:54 +0200
commit1943fa072ec3df5a87e18a23b0916f134c131016 (patch)
tree66a0d1962d0c888a58b49df4c184f3eb05e4b878 /qutebrowser/misc/sessions.py
parent1e473c4bc01da1d7f1c4386d8b7b887e00fbf385 (diff)
downloadqutebrowser-1943fa072ec3df5a87e18a23b0916f134c131016.tar.gz
qutebrowser-1943fa072ec3df5a87e18a23b0916f134c131016.zip
Handle tab pinned status in AbstractTab
This replaces TabbedBrowser.set_tab_pinned() with AbstractTab.set_pinned() and thus also allows us to set a tab as pinned without having to know which TabbedBrowser it belongs to. This also fixes a bug when :undo is used after closing a tab and then setting tabs_are_windows to true - we asked "self" (i.e. the TabbedBrowser the tab was closed in) to restore the tab's pinned status, but the tab wasn't actually part of that TabbedBrowser as it was opened in a new window after the undo.
Diffstat (limited to 'qutebrowser/misc/sessions.py')
-rw-r--r--qutebrowser/misc/sessions.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/qutebrowser/misc/sessions.py b/qutebrowser/misc/sessions.py
index dcdc0821b..0ebb415ac 100644
--- a/qutebrowser/misc/sessions.py
+++ b/qutebrowser/misc/sessions.py
@@ -470,8 +470,7 @@ class SessionManager(QObject):
if tab.get('active', False):
tab_to_focus = i
if new_tab.data.pinned:
- tabbed_browser.widget.set_tab_pinned(new_tab,
- new_tab.data.pinned)
+ new_tab.set_pinned(True)
if tab_to_focus is not None:
tabbed_browser.widget.setCurrentIndex(tab_to_focus)
if win.get('active', False):