--- a/mpdata/src/mpcollectiontbonelistdatamodel.cpp Tue Jul 06 14:13:36 2010 +0300
+++ b/mpdata/src/mpcollectiontbonelistdatamodel.cpp Wed Aug 18 09:46:20 2010 +0300
@@ -173,24 +173,26 @@
void MpCollectionTBoneListDataModel::updateSong()
{
TX_ENTRY
- int newSongId = mPlaybackData->id();
-
- if ( mCurrentSongId && newSongId != mCurrentSongId) {
- //Attempt to remove old song icon.
- QModelIndex oldSongIndex;
- oldSongIndex = index( mCollectionData->albumSongIndex( mCurrentSongId ) );
- if ( oldSongIndex.isValid() ) {
- emit dataChanged( oldSongIndex, oldSongIndex );
- }
+ if( mPlaybackActive ) {
+ int newSongId = mPlaybackData->id();
+
+ if ( mCurrentSongId && newSongId != mCurrentSongId) {
+ //Attempt to remove old song icon.
+ QModelIndex oldSongIndex;
+ oldSongIndex = index( mCollectionData->albumSongIndex( mCurrentSongId ) );
+ if ( oldSongIndex.isValid() ) {
+ emit dataChanged( oldSongIndex, oldSongIndex );
+ }
+ }
+
+ //Attempt to update current song data and state.
+ QModelIndex songIndex;
+ songIndex = index( mCollectionData->albumSongIndex( newSongId ) );
+ if ( songIndex.isValid() ) {
+ emit dataChanged( songIndex, songIndex );
+ }
+ mCurrentSongId = newSongId;
}
-
- //Attempt to update current song data and state.
- QModelIndex songIndex;
- songIndex = index( mCollectionData->albumSongIndex( newSongId ) );
- if ( songIndex.isValid() ) {
- emit dataChanged( songIndex, songIndex );
- }
- mCurrentSongId = newSongId;
TX_EXIT
}