From 534a85cf8f4710c81f7c853c1cf1c67f17862837 Mon Sep 17 00:00:00 2001 From: Franz Fellner Date: Wed, 24 Jun 2015 21:27:37 +0200 Subject: [PATCH] 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. --- qutebrowser/mainwindow/tabwidget.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qutebrowser/mainwindow/tabwidget.py b/qutebrowser/mainwindow/tabwidget.py index bbbfdf045..a5612a8b5 100644 --- a/qutebrowser/mainwindow/tabwidget.py +++ b/qutebrowser/mainwindow/tabwidget.py @@ -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')