From da4eac99614804dc9788597558c1b21622f606f6 Mon Sep 17 00:00:00 2001 From: Chris Hill Date: Mon, 26 Jan 2015 13:34:20 +0000 Subject: [PATCH] partial fix bug #1000729 'Support more song fields in the search' - fixed sort for topic search - by song Fixes: https://launchpad.net/bugs/1000729 --- openlp/plugins/songs/lib/mediaitem.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openlp/plugins/songs/lib/mediaitem.py b/openlp/plugins/songs/lib/mediaitem.py index d2cbad3c1..d83034402 100644 --- a/openlp/plugins/songs/lib/mediaitem.py +++ b/openlp/plugins/songs/lib/mediaitem.py @@ -301,7 +301,8 @@ class SongMediaItem(MediaManagerItem): log.debug('display results Topic') self.list_view.clear() for topic in search_results: - for song in topic.songs: + songs = sorted(topic.songs, key=lambda song: song.sort_key) + for song in songs: # Do not display temporary songs if song.temporary: continue