From 289bcf50e99397dfb283ae835f0992937bc8c824 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Tue, 19 Apr 2022 17:02:55 +0300 Subject: [PATCH] Fixed IconButtonWithText update when text changes. --- ui/widgets/icon_button_with_text.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/widgets/icon_button_with_text.cpp b/ui/widgets/icon_button_with_text.cpp index 7e28158..10dbde9 100644 --- a/ui/widgets/icon_button_with_text.cpp +++ b/ui/widgets/icon_button_with_text.cpp @@ -35,7 +35,10 @@ void IconButtonWithText::paintEvent(QPaintEvent *e) { } void IconButtonWithText::setText(const QString &text) { - _text = text; + if (_text != text) { + _text = text; + update(); + } } } // namespace Ui