Commit 86f20ec9 authored by Shantanu Tushar's avatar Shantanu Tushar
Browse files

Make playlist reordering work both the ways.

Patch by Ashish Madeti <ashishmadeti@gmail.com>
Welcome to KDE :)

BUG: 325012
REVIEW: 116626
parent ef239ce2
...@@ -136,7 +136,11 @@ void PlaylistModel::removeFromPlaylist(const int& index) ...@@ -136,7 +136,11 @@ void PlaylistModel::removeFromPlaylist(const int& index)
void PlaylistModel::moveItem(int firstIndex, int secondIndex) void PlaylistModel::moveItem(int firstIndex, int secondIndex)
{ {
d->musicList.move(firstIndex,secondIndex); d->musicList.move(firstIndex,secondIndex);
emit dataChanged(createIndex(firstIndex, 0), createIndex(secondIndex, 0)); if(firstIndex < secondIndex) {
emit dataChanged(createIndex(firstIndex, 0), createIndex(secondIndex, 0));
} else {
emit dataChanged(createIndex(secondIndex, 0), createIndex(firstIndex, 0));
}
} }
QString PlaylistModel::getNextUrl() QString PlaylistModel::getNextUrl()
......
Supports Markdown
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