Fix a bug with titles not being refreshed when pinning tabs

This commit is contained in:
Jay Kamat 2017-05-11 16:20:57 -07:00
parent 21455cf0e7
commit 66dfb1b1c9
No known key found for this signature in database
GPG Key ID: 5D2E399600F4F7B5
2 changed files with 4 additions and 4 deletions

View File

@ -99,10 +99,11 @@ class TabWidget(QTabWidget):
Args:
idx: The tab index.
pinned: Pinned tab state.
pinned: Pinned tab state to set.
"""
bar = self.tabBar()
bar.set_tab_data(idx, 'pinned', pinned)
self.update_tab_title(idx)
bar.update(bar.tabRect(idx))
if pinned:
@ -189,8 +190,7 @@ class TabWidget(QTabWidget):
@config.change_filter('tabs', 'title-format-pinned')
def update_tab_titles_pinned(self):
"""Update all texts."""
for idx in range(self.count()):
self.update_tab_title(idx)
self.update_tab_titles()
def tabInserted(self, idx):
"""Update titles when a tab was inserted."""

View File

@ -159,7 +159,7 @@ def clean_open_tabs(quteproc):
"""Clean up open windows and tabs."""
quteproc.set_setting('tabs', 'last-close', 'blank')
quteproc.send_cmd(':window-only')
quteproc.send_cmd(':tab-only')
quteproc.send_cmd(':tab-only --force')
quteproc.send_cmd(':tab-close --force')
quteproc.wait_for_load_finished_url('about:blank')