Create a new QStyleOptionTab object for each tab.
It seems under some circumstances (on Gentoo?), the existing QStyleOptionTab object was reused, causing subsequent tabs to have the same title as the first one. Fixes #778.
This commit is contained in:
parent
75b894a186
commit
534a85cf8f
@ -391,9 +391,9 @@ class TabBar(QTabBar):
|
||||
def paintEvent(self, _e):
|
||||
"""Override paintEvent to draw the tabs like we want to."""
|
||||
p = QStylePainter(self)
|
||||
tab = QStyleOptionTab()
|
||||
selected = self.currentIndex()
|
||||
for idx in range(self.count()):
|
||||
tab = QStyleOptionTab()
|
||||
self.initStyleOption(tab, idx)
|
||||
if idx == selected:
|
||||
bg_color = config.get('colors', 'tabs.bg.selected')
|
||||
|
Loading…
Reference in New Issue
Block a user