openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #16640
[Merge] lp:~phill-ridout/openlp/bug-1011286 into lp:openlp
phill has proposed merging lp:~phill-ridout/openlp/bug-1011286 into lp:openlp.
Requested reviews:
Jonathan Corwin (j-corwin)
Raoul Snyman (raoul-snyman)
Tim Bentley (trb143)
Related bugs:
Bug #1011286 in OpenLP: "Song Editor -> Edit All Crashes with out valid verse splitter"
https://bugs.launchpad.net/openlp/+bug/1011286
For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/bug-1011286/+merge/114507
Removed debug.log statment
Removed input validation on "Edit All" Dialog, as per Raouls comment on my previous merge request
--
https://code.launchpad.net/~phill-ridout/openlp/bug-1011286/+merge/114507
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/plugins/songs/forms/editverseform.py'
--- openlp/plugins/songs/forms/editverseform.py 2012-06-22 14:14:53 +0000
+++ openlp/plugins/songs/forms/editverseform.py 2012-07-11 20:50:26 +0000
@@ -187,11 +187,14 @@
return text
def accept(self):
- if self.hasSingleVerse:
- value = unicode(self.getVerse()[0])
- else:
- log.debug(unicode(self.getVerse()[0]).split(u'\n'))
- value = unicode(self.getVerse()[0]).split(u'\n')[1]
+ value = unicode(self.getVerse()[0])
+ if not self.hasSingleVerse:
+ value = value.split(u'\n')
+ if len(value) <= 1:
+ critical_error_message_box(
+ message=translate('SongsPlugin.EditSongForm',
+ 'Invalid entry, you need a verse splitter and some text.'))
+ return False
if not value:
lines = unicode(self.getVerse()[0]).split(u'\n')
index = 2
Follow ups