X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Ftopicbutton.cpp;h=a83779eac1f25dbbed957c3e14d39a0e266b69e5;hp=ee91ad59e57d04e11756df8dd4087546470288fd;hb=fb6f5bcbdebd8660f355a558dd7cc47f6df45965;hpb=87828aeae2510b29619aa79a3bd76885e2c1ebd4 diff --git a/src/qtui/topicbutton.cpp b/src/qtui/topicbutton.cpp index ee91ad59..a83779ea 100644 --- a/src/qtui/topicbutton.cpp +++ b/src/qtui/topicbutton.cpp @@ -57,8 +57,11 @@ void TopicButton::paintEvent(QPaintEvent *event) { } void TopicButton::setAndStyleText(const QString &text) { + if(QAbstractButton::text() == text) + return; + setText(text); // this triggers a repaint event + styledText = QtUi::style()->styleString(Message::mircToInternal(text)); - setText(styledText.text); int height = 1; foreach(QTextLayout::FormatRange fr, styledText.formats) { height = qMax(height, QFontMetrics(fr.format.font()).height());