← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~raoul-snyman/openlp/bug-763064 into lp:openlp

 

Raoul Snyman has proposed merging lp:~raoul-snyman/openlp/bug-763064 into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)
Related bugs:
  Bug #763064 in OpenLP: "Empty line in first verse prevents saving a song"
  https://bugs.launchpad.net/openlp/+bug/763064

For more details, see:
https://code.launchpad.net/~raoul-snyman/openlp/bug-763064/+merge/64498

Fixed bug #763064: Empty line in first verse prevents saving a song.
-- 
https://code.launchpad.net/~raoul-snyman/openlp/bug-763064/+merge/64498
Your team OpenLP Core is requested to review the proposed merge of lp:~raoul-snyman/openlp/bug-763064 into lp:openlp.
=== modified file 'openlp/plugins/songs/forms/editverseform.py'
--- openlp/plugins/songs/forms/editverseform.py	2011-06-12 16:02:52 +0000
+++ openlp/plugins/songs/forms/editverseform.py	2011-06-14 06:22:31 +0000
@@ -185,7 +185,14 @@
         if self.hasSingleVerse:
             value = unicode(self.getVerse()[0])
         else:
-            value = self.getVerse()[0].split(u'\n')[1]
+            log.debug(unicode(self.getVerse()[0]).split(u'\n'))
+            value = unicode(self.getVerse()[0]).split(u'\n')[1]
+            if len(value) == 0:
+                lines = unicode(self.getVerse()[0]).split(u'\n')
+                index = 2
+                while index < len(lines) and len(value) == 0:
+                    value = lines[index]
+                    index += 1
         if len(value) == 0:
             critical_error_message_box(
                 message=translate('SongsPlugin.EditSongForm',


Follow ups