From 69d24335844c69d3caaabfdbfef9ac02973956f7 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 10 Oct 2018 07:56:59 +0200 Subject: [PATCH] Remove TextBase.setText workaround Reverts 561a7e1cdd88f9cd735d82db9cc5710763b55f42 https://bugreports.qt.io/browse/QTBUG-36945 apparently got fixed at some point. --- qutebrowser/mainwindow/statusbar/textbase.py | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/qutebrowser/mainwindow/statusbar/textbase.py b/qutebrowser/mainwindow/statusbar/textbase.py index 5c157e52a..399fafee7 100644 --- a/qutebrowser/mainwindow/statusbar/textbase.py +++ b/qutebrowser/mainwindow/statusbar/textbase.py @@ -62,27 +62,13 @@ class TextBase(QLabel): self._elided_text = '' def setText(self, txt): - """Extend QLabel::setText. - - This update the elided text after setting the text, and also works - around a weird QLabel redrawing bug where it doesn't redraw correctly - when the text is empty -- we explicitly need to call repaint() to - resolve this. - - More info: - - http://stackoverflow.com/q/21890462/2085149 - https://bugreports.qt.io/browse/QTBUG-36945 - https://codereview.qt-project.org/#/c/79181/ + """Extend QLabel::setText to update the elided text afterwards. Args: txt: The text to set (string). """ super().setText(txt) self._update_elided_text(self.geometry().width()) - if not txt: - # WORKAROUND - self.repaint() def resizeEvent(self, e): """Extend QLabel::resizeEvent to update the elided text afterwards."""