diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2010-09-15 18:29:45 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2010-09-15 18:29:45 +0000 |
| commit | e2bc4908a3397ded862d9e8494544131e4448158 (patch) | |
| tree | a72cb3ed23c4df927739df3a57a387b80c12ffed /src/qmmpui/playlistmodel.cpp | |
| parent | 4b02064e9f260443c38ba6e145d64715b9031e27 (diff) | |
| download | qmmp-e2bc4908a3397ded862d9e8494544131e4448158.tar.gz qmmp-e2bc4908a3397ded862d9e8494544131e4448158.tar.bz2 qmmp-e2bc4908a3397ded862d9e8494544131e4448158.zip | |
fixed problem with shuffle and crossfade
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1888 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/qmmpui/playlistmodel.cpp')
| -rw-r--r-- | src/qmmpui/playlistmodel.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/qmmpui/playlistmodel.cpp b/src/qmmpui/playlistmodel.cpp index 17bfc7fd9..58cac7770 100644 --- a/src/qmmpui/playlistmodel.cpp +++ b/src/qmmpui/playlistmodel.cpp @@ -147,11 +147,12 @@ PlayListItem* PlayListModel::currentItem() PlayListItem* PlayListModel::nextItem() { - if(isShuffle() || m_items.isEmpty() || !isEmptyQueue()) + if(m_items.isEmpty() || !isEmptyQueue() || !m_play_state) return 0; - if(m_current < m_items.size() - 1) - return m_items.at(m_current + 1); - return 0; + int index = m_play_state->nextIndex(); + if(index < 0 || (index + 1 > m_items.count())) + return 0; + return m_items.at(index); } PlayListItem* PlayListModel::item(int row) const |
