mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-15 10:48:33 +01:00
Renumber tracks correctly starting from the top one even when the user selects them "backwards" (starting from the bottom).
This commit is contained in:
parent
30daf4aca2
commit
3f360d254f
@ -800,6 +800,9 @@ void MainWindow::RenumberTracks() {
|
||||
QModelIndexList indexes=ui_.playlist->selectionModel()->selection().indexes();
|
||||
int track=1;
|
||||
|
||||
// Get the index list in order
|
||||
qStableSort(indexes);
|
||||
|
||||
// if first selected song has a track number set, start from that offset
|
||||
if (indexes.size()) {
|
||||
Song first_song=playlist_->item_at(indexes[0].row())->Metadata();
|
||||
|
Loading…
Reference in New Issue
Block a user