From d087bbb53ad4827be33c2927ad05993b5dcc0ea3 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Mon, 24 Jan 2011 21:01:09 +0100 Subject: [PATCH] verseOrder fix --- openlp/plugins/songs/forms/songexportform.py | 12 ++++++++---- openlp/plugins/songs/lib/openlyricsexport.py | 3 ++- openlp/plugins/songs/lib/xml.py | 4 ++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/openlp/plugins/songs/forms/songexportform.py b/openlp/plugins/songs/forms/songexportform.py index f7cc0e616..b4bc2de42 100644 --- a/openlp/plugins/songs/forms/songexportform.py +++ b/openlp/plugins/songs/forms/songexportform.py @@ -305,16 +305,20 @@ class SongExportForm(OpenLPWizard): """ Adds the double clicked item to the list of selected songs and removes it from the list of availables songs. + + ``item`` + The *QListWidgetItem* which was double clicked. """ - row = self.availableListWidget.row(item) - self.availableListWidget.takeItem(row) + self.availableListWidget.takeItem(self.availableListWidget.row(item)) self.selectedListWidget.addItem(item) def onSelectedListItemDoubleClicked(self, item): """ Adds the double clicked item back to the list of available songs and removes it from the list of selected songs. + + ``ìtem`` + The *QListWidgetItem* which was double clicked. """ - row = self.selectedListWidget.row(item) - self.selectedListWidget.takeItem(row) + self.selectedListWidget.takeItem(self.selectedListWidget.row(item)) self.availableListWidget.addItem(item) diff --git a/openlp/plugins/songs/lib/openlyricsexport.py b/openlp/plugins/songs/lib/openlyricsexport.py index 0f8f679f5..b657f891f 100755 --- a/openlp/plugins/songs/lib/openlyricsexport.py +++ b/openlp/plugins/songs/lib/openlyricsexport.py @@ -30,7 +30,7 @@ songs from the database. import logging import os -from lxml import etree, objectify +from lxml import etree from openlp.core.lib import Receiver, translate from openlp.plugins.songs.lib import OpenLyrics @@ -55,6 +55,7 @@ class OpenLyricsExport(object): """ Export the songs. """ + log.debug(u'started OpenLyricsExport') openLyrics = OpenLyrics(self.manager) self.parent.progressBar.setMaximum(len(self.songs)) for song in self.songs: diff --git a/openlp/plugins/songs/lib/xml.py b/openlp/plugins/songs/lib/xml.py index 78028f637..cc2660874 100644 --- a/openlp/plugins/songs/lib/xml.py +++ b/openlp/plugins/songs/lib/xml.py @@ -486,9 +486,9 @@ class OpenLyrics(object): for name in temp_verse_order: if name[0] == previous_type: if name[1] != previous_number: - verse_order.append(u''.join((name[0], name[1]))) + verse_order.append(u''.join((name[0][0], name[1]))) else: - verse_order.append(u''.join((name[0], name[1]))) + verse_order.append(u''.join((name[0][0], name[1]))) previous_type = name[0] previous_number = name[1] previous_part = name[2]