Fix a bug where dragging songs to the bottom of the playlist would actually move them back to the top.
This commit is contained in:
parent
de782c980d
commit
2035c3e7f5
|
@ -791,6 +791,10 @@ void Playlist::MoveItemsWithoutUndo(const QList<int>& source_rows, int pos) {
|
|||
layoutAboutToBeChanged();
|
||||
PlaylistItemList moved_items;
|
||||
|
||||
if (pos < 0) {
|
||||
pos = items_.count();
|
||||
}
|
||||
|
||||
// Take the items out of the list first, keeping track of whether the
|
||||
// insertion point changes
|
||||
int offset = 0;
|
||||
|
@ -803,10 +807,6 @@ void Playlist::MoveItemsWithoutUndo(const QList<int>& source_rows, int pos) {
|
|||
offset++;
|
||||
}
|
||||
|
||||
if (pos < 0) {
|
||||
pos = items_.count();
|
||||
}
|
||||
|
||||
// Put the items back in
|
||||
for (int i=start ; i<start+moved_items.count() ; ++i) {
|
||||
moved_items[i - start]->RemoveForegroundColor(kDynamicHistoryPriority);
|
||||
|
|
Loading…
Reference in New Issue