Fixed bug #817674: Export Song - Song list appears to be random order.

bzr-revno: 1706
This commit is contained in:
Chris Blake 2011-08-08 22:09:12 +02:00 committed by Raoul Snyman
commit ccaa1bdf92
1 changed files with 2 additions and 0 deletions

View File

@ -28,6 +28,7 @@
The :mod:`songexportform` module provides the wizard for exporting songs to the The :mod:`songexportform` module provides the wizard for exporting songs to the
OpenLyrics format. OpenLyrics format.
""" """
import locale
import logging import logging
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
@ -249,6 +250,7 @@ class SongExportForm(OpenLPWizard):
# Load the list of songs. # Load the list of songs.
Receiver.send_message(u'cursor_busy') Receiver.send_message(u'cursor_busy')
songs = self.plugin.manager.get_all_objects(Song) songs = self.plugin.manager.get_all_objects(Song)
songs.sort(cmp=locale.strcoll, key=lambda song: song.title.lower())
for song in songs: for song in songs:
authors = u', '.join([author.display_name authors = u', '.join([author.display_name
for author in song.authors]) for author in song.authors])