Always display plain titles in tab tooltips

Closes #3741
This commit is contained in:
Jay Kamat 2018-03-21 23:41:53 -04:00
parent 300d873b18
commit d2c01d7ee6
No known key found for this signature in database
GPG Key ID: 5D2E399600F4F7B5

View File

@ -148,9 +148,13 @@ class TabWidget(QTabWidget):
title = '' if fmt is None else fmt.format(**fields)
tabbar = self.tabBar()
# Only change the tab title if it changes, setting the tab title causes
# a size recalculation which is slow.
if tabbar.tabText(idx) != title:
tabbar.setTabText(idx, title)
tabbar.setTabToolTip(idx, title)
# always show only plain title in tooltips
tabbar.setTabToolTip(idx, fields['title'])
def get_tab_fields(self, idx):
"""Get the tab field data."""