Fix a bug with titles not being refreshed when pinning tabs
This commit is contained in:
parent
21455cf0e7
commit
66dfb1b1c9
@ -99,10 +99,11 @@ class TabWidget(QTabWidget):
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
idx: The tab index.
|
idx: The tab index.
|
||||||
pinned: Pinned tab state.
|
pinned: Pinned tab state to set.
|
||||||
"""
|
"""
|
||||||
bar = self.tabBar()
|
bar = self.tabBar()
|
||||||
bar.set_tab_data(idx, 'pinned', pinned)
|
bar.set_tab_data(idx, 'pinned', pinned)
|
||||||
|
self.update_tab_title(idx)
|
||||||
bar.update(bar.tabRect(idx))
|
bar.update(bar.tabRect(idx))
|
||||||
|
|
||||||
if pinned:
|
if pinned:
|
||||||
@ -189,8 +190,7 @@ class TabWidget(QTabWidget):
|
|||||||
@config.change_filter('tabs', 'title-format-pinned')
|
@config.change_filter('tabs', 'title-format-pinned')
|
||||||
def update_tab_titles_pinned(self):
|
def update_tab_titles_pinned(self):
|
||||||
"""Update all texts."""
|
"""Update all texts."""
|
||||||
for idx in range(self.count()):
|
self.update_tab_titles()
|
||||||
self.update_tab_title(idx)
|
|
||||||
|
|
||||||
def tabInserted(self, idx):
|
def tabInserted(self, idx):
|
||||||
"""Update titles when a tab was inserted."""
|
"""Update titles when a tab was inserted."""
|
||||||
|
@ -159,7 +159,7 @@ def clean_open_tabs(quteproc):
|
|||||||
"""Clean up open windows and tabs."""
|
"""Clean up open windows and tabs."""
|
||||||
quteproc.set_setting('tabs', 'last-close', 'blank')
|
quteproc.set_setting('tabs', 'last-close', 'blank')
|
||||||
quteproc.send_cmd(':window-only')
|
quteproc.send_cmd(':window-only')
|
||||||
quteproc.send_cmd(':tab-only')
|
quteproc.send_cmd(':tab-only --force')
|
||||||
quteproc.send_cmd(':tab-close --force')
|
quteproc.send_cmd(':tab-close --force')
|
||||||
quteproc.wait_for_load_finished_url('about:blank')
|
quteproc.wait_for_load_finished_url('about:blank')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user