Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 8028d2c9 authored by Scott Wheeler's avatar Scott Wheeler

Make back work in random play mode again.

svn path=/trunk/kdemultimedia/juk/; revision=322284
parent a7de1d16
......@@ -469,7 +469,7 @@ void Playlist::playPrevious()
if(!previous)
previous = static_cast<PlaylistItem *>(m_playingItem->itemAbove());
setPlaying(previous);
setPlaying(previous, false);
}
void Playlist::setName(const QString &n)
......@@ -1245,19 +1245,24 @@ void Playlist::loadFile(const QString &fileName, const QFileInfo &fileInfo)
m_disableColumnWidthUpdates = false;
}
void Playlist::setPlaying(PlaylistItem *item)
void Playlist::setPlaying(PlaylistItem *item, bool addToHistory)
{
if(m_playingItem == item)
return;
if(m_playingItem) {
m_playingItem->setPixmap(m_leftColumn, QPixmap(0, 0));
m_playingItem->setPlaying(false);
if(addToHistory)
m_playingItem->playlist()->m_history.append(m_playingItem);
m_playingItem = 0;
}
if(!item)
return;
item->playlist()->m_history.append(item);
m_playingItem = item;
item->setPixmap(m_leftColumn, UserIcon("playing"));
item->setPlaying(true);
......
......@@ -217,7 +217,7 @@ public:
* Set item to be the playing item. If \a item is null then this will clear
* the playing indicator.
*/
static void setPlaying(PlaylistItem *item);
static void setPlaying(PlaylistItem *item, bool addToHistory = true);
/**
* Returns true if this playlist is currently playing.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment