mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-17 12:02:48 +01:00
When renumbering tracks, only start from the track number of the first track if it's greater than 0. Fixes issue 2072
This commit is contained in:
parent
7f7451b72a
commit
2f63130606
@ -1445,10 +1445,11 @@ void MainWindow::RenumberTracks() {
|
||||
qStableSort(indexes);
|
||||
|
||||
// if first selected song has a track number set, start from that offset
|
||||
if (indexes.size()) {
|
||||
Song first_song=playlists_->current()->item_at(indexes[0].row())->Metadata();
|
||||
if (int first_track = first_song.track())
|
||||
track = first_track;
|
||||
if (!indexes.isEmpty()) {
|
||||
const Song first_song = playlists_->current()->item_at(indexes[0].row())->Metadata();
|
||||
|
||||
if (first_song.track() > 0)
|
||||
track = first_song.track();
|
||||
}
|
||||
|
||||
foreach (const QModelIndex& index, indexes) {
|
||||
|
Loading…
Reference in New Issue
Block a user