Skip to content

Commit

Permalink
Files panel: sort selected tracks when they come from a directory
Browse files Browse the repository at this point in the history
- Fixes #290
  • Loading branch information
virtuald committed Apr 22, 2017
1 parent efe224b commit e3cd6ad
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion xlgui/panel/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,14 @@ def get_selected_tracks(self):

for path in paths:
f = model[path][0]
self.append_recursive(tracks, f)

dtracks = []
self.append_recursive(dtracks, f)

# don't sort all the tracks; this only is needed if the selected
# items is a directory
dtracks.sort(key=lambda t: t.get_tag_sort('title'))
tracks.extend(dtracks)

return tracks

Expand Down

0 comments on commit e3cd6ad

Please sign in to comment.