From de78768be6408a29750d63a4aa04da6418344916 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Sat, 5 Dec 2015 09:38:26 +0100 Subject: [PATCH] Delay AudioControls repaint until we've updated all elements. Looks smoother. --- src/tomahawk/AudioControls.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tomahawk/AudioControls.cpp b/src/tomahawk/AudioControls.cpp index 08954f707..b4d2db496 100644 --- a/src/tomahawk/AudioControls.cpp +++ b/src/tomahawk/AudioControls.cpp @@ -310,8 +310,9 @@ AudioControls::onPlaybackLoading( const Tomahawk::result_ptr result ) connect( m_currentTrack->track().data(), SIGNAL( coverChanged() ), SLOT( onCoverUpdated() ) ); connect( m_currentTrack->track().data(), SIGNAL( socialActionsLoaded() ), SLOT( onSocialActionsLoaded() ) ); - ui->artistLabel->setResult( result ); + setUpdatesEnabled( false ); ui->trackLabel->setResult( result ); + ui->artistLabel->setResult( result ); const QString duration = TomahawkUtils::timeToString( result.data()->track()->duration() ); ui->timeLabel->setFixedWidth( ui->timeLabel->fontMetrics().width( QString( duration.length(), QChar( '0' ) ) ) ); @@ -370,6 +371,7 @@ AudioControls::onPlaybackLoading( const Tomahawk::result_ptr result ) setCover(); setSocialActions(); + setUpdatesEnabled( true ); }