mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-31 11:35:24 +01:00
Fix a bug where moving songs down in the playlist could not be undone properly. Fixes issue 1908
This commit is contained in:
parent
c084d13ff1
commit
7c1cedeac8
@ -777,12 +777,17 @@ void Playlist::MoveItemsWithoutUndo(int start, const QList<int>& dest_rows) {
|
||||
layoutAboutToBeChanged();
|
||||
PlaylistItemList moved_items;
|
||||
|
||||
if (start == -1)
|
||||
if (start == -1) {
|
||||
start = items_.count() - dest_rows.count();
|
||||
} else {
|
||||
foreach (int dest_row, dest_rows) {
|
||||
if (start >= dest_row)
|
||||
start--;
|
||||
}
|
||||
}
|
||||
|
||||
// Take the items out of the list first, keeping track of whether the
|
||||
// insertion point changes
|
||||
for (int i=start ; i<start + dest_rows.count() ; ++i)
|
||||
// Take the items out of the list first
|
||||
for (int i = 0; i < dest_rows.count(); i++)
|
||||
moved_items << items_.takeAt(start);
|
||||
|
||||
// Put the items back in
|
||||
|
@ -486,7 +486,7 @@ msgstr ""
|
||||
msgid "After copying..."
|
||||
msgstr ""
|
||||
|
||||
#: playlist/playlist.cpp:1104 ui/organisedialog.cpp:52
|
||||
#: playlist/playlist.cpp:1109 ui/organisedialog.cpp:52
|
||||
#: ui/qtsystemtrayicon.cpp:252 ../bin/src/ui_groupbydialog.h:129
|
||||
#: ../bin/src/ui_groupbydialog.h:142 ../bin/src/ui_groupbydialog.h:155
|
||||
#: ../bin/src/ui_albumcoversearcher.h:110
|
||||
@ -499,7 +499,7 @@ msgstr ""
|
||||
msgid "Album (ideal loudness for all tracks)"
|
||||
msgstr ""
|
||||
|
||||
#: playlist/playlist.cpp:1110 ui/organisedialog.cpp:55
|
||||
#: playlist/playlist.cpp:1115 ui/organisedialog.cpp:55
|
||||
#: ../bin/src/ui_edittagdialog.h:658
|
||||
msgid "Album artist"
|
||||
msgstr ""
|
||||
@ -641,7 +641,7 @@ msgstr ""
|
||||
msgid "Are you sure you want to reset this song's statistics?"
|
||||
msgstr ""
|
||||
|
||||
#: playlist/playlist.cpp:1103 ui/organisedialog.cpp:53
|
||||
#: playlist/playlist.cpp:1108 ui/organisedialog.cpp:53
|
||||
#: ui/qtsystemtrayicon.cpp:250 ../bin/src/ui_groupbydialog.h:130
|
||||
#: ../bin/src/ui_groupbydialog.h:143 ../bin/src/ui_groupbydialog.h:156
|
||||
#: ../bin/src/ui_albumcoversearcher.h:106
|
||||
@ -709,7 +709,7 @@ msgstr ""
|
||||
msgid "Average image size"
|
||||
msgstr ""
|
||||
|
||||
#: playlist/playlist.cpp:1119 ui/organisedialog.cpp:59
|
||||
#: playlist/playlist.cpp:1124 ui/organisedialog.cpp:59
|
||||
#: ../bin/src/ui_edittagdialog.h:638
|
||||
msgid "BPM"
|
||||
msgstr ""
|
||||
@ -755,7 +755,7 @@ msgstr ""
|
||||
msgid "Biography from %1"
|
||||
msgstr ""
|
||||
|
||||
#: playlist/playlist.cpp:1120 ../bin/src/ui_edittagdialog.h:640
|
||||
#: playlist/playlist.cpp:1125 ../bin/src/ui_edittagdialog.h:640
|
||||
msgid "Bit rate"
|
||||
msgstr ""
|
||||
|
||||
@ -973,7 +973,7 @@ msgstr ""
|
||||
msgid "Comma separated list of class:level, level is 0-3"
|
||||
msgstr ""
|
||||
|
||||
#: playlist/playlist.cpp:1129 smartplaylists/searchterm.cpp:279
|
||||
#: playlist/playlist.cpp:1134 smartplaylists/searchterm.cpp:279
|
||||
#: ui/organisedialog.cpp:62 ../bin/src/ui_edittagdialog.h:661
|
||||
msgid "Comment"
|
||||
msgstr ""
|
||||
@ -986,7 +986,7 @@ msgstr ""
|
||||
msgid "Complete tags automatically..."
|
||||
msgstr ""
|
||||
|
||||
#: playlist/playlist.cpp:1111 ui/organisedialog.cpp:56
|
||||
#: playlist/playlist.cpp:1116 ui/organisedialog.cpp:56
|
||||
#: ../bin/src/ui_groupbydialog.h:132 ../bin/src/ui_groupbydialog.h:145
|
||||
#: ../bin/src/ui_groupbydialog.h:158 ../bin/src/ui_edittagdialog.h:659
|
||||
msgid "Composer"
|
||||
@ -1233,11 +1233,11 @@ msgstr ""
|
||||
msgid "Dance"
|
||||
msgstr ""
|
||||
|
||||
#: playlist/playlist.cpp:1127 ../bin/src/ui_edittagdialog.h:649
|
||||
#: playlist/playlist.cpp:1132 ../bin/src/ui_edittagdialog.h:649
|
||||
msgid "Date created"
|
||||
msgstr ""
|
||||
|
||||
#: playlist/playlist.cpp:1126 ../bin/src/ui_edittagdialog.h:648
|
||||
#: playlist/playlist.cpp:1131 ../bin/src/ui_edittagdialog.h:648
|
||||
msgid "Date modified"
|
||||
msgstr ""
|
||||
|
||||
@ -1372,7 +1372,7 @@ msgstr ""
|
||||
msgid "Disabled"
|
||||
msgstr ""
|
||||
|
||||
#: playlist/playlist.cpp:1107 ui/organisedialog.cpp:58
|
||||
#: playlist/playlist.cpp:1112 ui/organisedialog.cpp:58
|
||||
#: ../bin/src/ui_edittagdialog.h:655
|
||||
msgid "Disc"
|
||||
msgstr ""
|
||||
@ -1729,19 +1729,19 @@ msgstr ""
|
||||
msgid "File formats"
|
||||
msgstr ""
|
||||
|
||||
#: playlist/playlist.cpp:1122 ../bin/src/ui_edittagdialog.h:650
|
||||
#: playlist/playlist.cpp:1127 ../bin/src/ui_edittagdialog.h:650
|
||||
msgid "File name"
|
||||
msgstr ""
|
||||
|
||||
#: playlist/playlist.cpp:1123
|
||||
#: playlist/playlist.cpp:1128
|
||||
msgid "File name (without path)"
|
||||
msgstr ""
|
||||
|
||||
#: playlist/playlist.cpp:1124 ../bin/src/ui_edittagdialog.h:644
|
||||
#: playlist/playlist.cpp:1129 ../bin/src/ui_edittagdialog.h:644
|
||||
msgid "File size"
|
||||
msgstr ""
|
||||
|
||||
#: playlist/playlist.cpp:1125 ../bin/src/ui_groupbydialog.h:133
|
||||
#: playlist/playlist.cpp:1130 ../bin/src/ui_groupbydialog.h:133
|
||||
#: ../bin/src/ui_groupbydialog.h:146 ../bin/src/ui_groupbydialog.h:159
|
||||
#: ../bin/src/ui_edittagdialog.h:646
|
||||
msgid "File type"
|
||||
@ -1874,7 +1874,7 @@ msgstr ""
|
||||
msgid "General settings"
|
||||
msgstr ""
|
||||
|
||||
#: playlist/playlist.cpp:1109 ui/organisedialog.cpp:61
|
||||
#: playlist/playlist.cpp:1114 ui/organisedialog.cpp:61
|
||||
#: ../bin/src/ui_groupbydialog.h:134 ../bin/src/ui_groupbydialog.h:147
|
||||
#: ../bin/src/ui_groupbydialog.h:160 ../bin/src/ui_edittagdialog.h:660
|
||||
msgid "Genre"
|
||||
@ -2205,7 +2205,7 @@ msgstr ""
|
||||
msgid "Large sidebar"
|
||||
msgstr ""
|
||||
|
||||
#: library/library.cpp:66 playlist/playlist.cpp:1116
|
||||
#: library/library.cpp:66 playlist/playlist.cpp:1121
|
||||
#: ../bin/src/ui_edittagdialog.h:641
|
||||
msgid "Last played"
|
||||
msgstr ""
|
||||
@ -2284,7 +2284,7 @@ msgstr ""
|
||||
msgid "Leave blank for the default. Examples: \"/dev/dsp\", \"front\", etc."
|
||||
msgstr ""
|
||||
|
||||
#: playlist/playlist.cpp:1105 ui/organisedialog.cpp:63
|
||||
#: playlist/playlist.cpp:1110 ui/organisedialog.cpp:63
|
||||
#: ui/qtsystemtrayicon.cpp:255 ../bin/src/ui_edittagdialog.h:636
|
||||
msgid "Length"
|
||||
msgstr ""
|
||||
@ -2905,7 +2905,7 @@ msgstr ""
|
||||
msgid "Play artist radio..."
|
||||
msgstr ""
|
||||
|
||||
#: playlist/playlist.cpp:1114 ../bin/src/ui_edittagdialog.h:637
|
||||
#: playlist/playlist.cpp:1119 ../bin/src/ui_edittagdialog.h:637
|
||||
msgid "Play count"
|
||||
msgstr ""
|
||||
|
||||
@ -3153,7 +3153,7 @@ msgstr ""
|
||||
msgid "Rate the current song 5 stars"
|
||||
msgstr ""
|
||||
|
||||
#: playlist/playlist.cpp:1113 ../bin/src/ui_edittagdialog.h:645
|
||||
#: playlist/playlist.cpp:1118 ../bin/src/ui_edittagdialog.h:645
|
||||
msgid "Rating"
|
||||
msgstr ""
|
||||
|
||||
@ -3334,7 +3334,7 @@ msgstr ""
|
||||
msgid "Safely remove the device after copying"
|
||||
msgstr ""
|
||||
|
||||
#: playlist/playlist.cpp:1121 ../bin/src/ui_edittagdialog.h:642
|
||||
#: playlist/playlist.cpp:1126 ../bin/src/ui_edittagdialog.h:642
|
||||
msgid "Sample rate"
|
||||
msgstr ""
|
||||
|
||||
@ -3378,7 +3378,7 @@ msgstr ""
|
||||
msgid "Scalable sampling rate profile (SSR)"
|
||||
msgstr ""
|
||||
|
||||
#: playlist/playlist.cpp:1117 ../bin/src/ui_edittagdialog.h:643
|
||||
#: playlist/playlist.cpp:1122 ../bin/src/ui_edittagdialog.h:643
|
||||
msgid "Score"
|
||||
msgstr ""
|
||||
|
||||
@ -3672,7 +3672,7 @@ msgstr ""
|
||||
msgid "Skip backwards in playlist"
|
||||
msgstr ""
|
||||
|
||||
#: playlist/playlist.cpp:1115 ../bin/src/ui_edittagdialog.h:639
|
||||
#: playlist/playlist.cpp:1120 ../bin/src/ui_edittagdialog.h:639
|
||||
msgid "Skip count"
|
||||
msgstr ""
|
||||
|
||||
@ -4043,7 +4043,7 @@ msgstr ""
|
||||
msgid "Timezone"
|
||||
msgstr ""
|
||||
|
||||
#: playlist/playlist.cpp:1102 ui/organisedialog.cpp:51
|
||||
#: playlist/playlist.cpp:1107 ui/organisedialog.cpp:51
|
||||
#: ui/qtsystemtrayicon.cpp:248 ../bin/src/ui_about.h:142
|
||||
#: ../bin/src/ui_edittagdialog.h:652 ../bin/src/ui_trackselectiondialog.h:211
|
||||
msgid "Title"
|
||||
@ -4081,7 +4081,7 @@ msgstr ""
|
||||
msgid "Total network requests made"
|
||||
msgstr ""
|
||||
|
||||
#: playlist/playlist.cpp:1106 ui/organisedialog.cpp:57
|
||||
#: playlist/playlist.cpp:1111 ui/organisedialog.cpp:57
|
||||
#: ../bin/src/ui_edittagdialog.h:653 ../bin/src/ui_trackselectiondialog.h:212
|
||||
msgid "Track"
|
||||
msgstr ""
|
||||
@ -4396,7 +4396,7 @@ msgstr ""
|
||||
msgid "Would you like to run a full rescan right now?"
|
||||
msgstr ""
|
||||
|
||||
#: playlist/playlist.cpp:1108 ui/organisedialog.cpp:60
|
||||
#: playlist/playlist.cpp:1113 ui/organisedialog.cpp:60
|
||||
#: ../bin/src/ui_groupbydialog.h:135 ../bin/src/ui_groupbydialog.h:148
|
||||
#: ../bin/src/ui_groupbydialog.h:161 ../bin/src/ui_edittagdialog.h:657
|
||||
msgid "Year"
|
||||
|
Loading…
x
Reference in New Issue
Block a user