ContextView: Only update top text when changed

This commit is contained in:
Jonas Kvinge 2024-08-06 23:24:58 +02:00
parent 40f3e828aa
commit c69777ca39
1 changed files with 4 additions and 1 deletions

View File

@ -547,7 +547,10 @@ void ContextView::SetSong() {
void ContextView::UpdateSong(const Song &song) {
textedit_top_->SetText(QStringLiteral("<b>%1</b><br />%2").arg(Utilities::ReplaceMessage(title_fmt_, song, QStringLiteral("<br />"), true), Utilities::ReplaceMessage(summary_fmt_, song, QStringLiteral("<br />"), true)));
const QString top_text = QStringLiteral("<b>%1</b><br />%2").arg(Utilities::ReplaceMessage(title_fmt_, song, QStringLiteral("<br />"), true), Utilities::ReplaceMessage(summary_fmt_, song, QStringLiteral("<br />"), 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());