From c69777ca391dff7020e0a03353d9b64af4f2ab88 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Tue, 6 Aug 2024 23:24:58 +0200 Subject: [PATCH] ContextView: Only update top text when changed --- src/context/contextview.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/context/contextview.cpp b/src/context/contextview.cpp index 4e16a95d4..5c8fc4b01 100644 --- a/src/context/contextview.cpp +++ b/src/context/contextview.cpp @@ -547,7 +547,10 @@ void ContextView::SetSong() { void ContextView::UpdateSong(const Song &song) { - textedit_top_->SetText(QStringLiteral("%1
%2").arg(Utilities::ReplaceMessage(title_fmt_, song, QStringLiteral("
"), true), Utilities::ReplaceMessage(summary_fmt_, song, QStringLiteral("
"), true))); + const QString top_text = QStringLiteral("%1
%2").arg(Utilities::ReplaceMessage(title_fmt_, song, QStringLiteral("
"), true), Utilities::ReplaceMessage(summary_fmt_, song, QStringLiteral("
"), true)); + if (top_text != textedit_top_->Text()) { + textedit_top_->SetText(top_text); + } if (action_show_data_->isChecked()) { if (song.filetype() != song_playing_.filetype()) label_filetype_->setText(song.TextForFiletype());