diff options
author | Florian Bruhin <me@the-compiler.org> | 2020-09-14 14:51:54 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2020-09-14 14:51:54 +0200 |
commit | 1943fa072ec3df5a87e18a23b0916f134c131016 (patch) | |
tree | 66a0d1962d0c888a58b49df4c184f3eb05e4b878 /qutebrowser/misc/sessions.py | |
parent | 1e473c4bc01da1d7f1c4386d8b7b887e00fbf385 (diff) | |
download | qutebrowser-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.py | 3 |
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): |