openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #16841
[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:
Tim Bentley (trb143)
Jonathan Corwin (j-corwin)
Andreas Preikschat (googol)
Raoul Snyman (raoul-snyman)
Related bugs:
Bug #1011286 in OpenLP: "Song Editor -> Edit All Crashes with out valid verse splitter"
https://bugs.launchpad.net/openlp/+bug/1011286
Bug #1023611 in OpenLP: "Empty verse tags in song editor->edit all are silently removed "
https://bugs.launchpad.net/openlp/+bug/1023611
For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/bug-1011286/+merge/119419
I have actually fixed the entering of verses with no text! I would appreciate extended testing on this, as I have made a change in the renderer code. As far as my testing goes, I have not broken any thing. But you guys have a knack of finding flaws ;-)
The validation is no longer needed, as it was just checking that each verse had some text.
Changed the save button to OK as per the reasons in my email.
--
https://code.launchpad.net/~phill-ridout/openlp/bug-1011286/+merge/119419
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/lib/renderer.py'
--- openlp/core/lib/renderer.py 2012-07-02 18:45:03 +0000
+++ openlp/core/lib/renderer.py 2012-08-13 19:34:21 +0000
@@ -450,8 +450,7 @@
previous_html, previous_raw, html_lines, lines, separator, u'')
else:
previous_raw = separator.join(lines)
- if previous_raw:
- formatted.append(previous_raw)
+ formatted.append(previous_raw)
log.debug(u'_paginate_slide - End')
return formatted
=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py 2012-07-07 14:54:14 +0000
+++ openlp/plugins/songs/forms/editsongform.py 2012-08-13 19:34:21 +0000
@@ -528,9 +528,9 @@
for row in self.findVerseSplit.split(verse_list):
for match in row.split(u'---['):
for count, parts in enumerate(match.split(u']---\n')):
- if len(parts) <= 1:
- continue
if count == 0:
+ if len(parts) == 0:
+ continue
# handling carefully user inputted versetags
separator = parts.find(u':')
if separator >= 0:
=== modified file 'openlp/plugins/songs/forms/editversedialog.py'
--- openlp/plugins/songs/forms/editversedialog.py 2012-06-22 14:14:53 +0000
+++ openlp/plugins/songs/forms/editversedialog.py 2012-08-13 19:34:21 +0000
@@ -67,7 +67,7 @@
self.verseTypeLayout.addStretch()
self.dialogLayout.addLayout(self.verseTypeLayout)
self.buttonBox = create_button_box(editVerseDialog, u'buttonBox',
- [u'cancel', u'save'])
+ [u'cancel', u'ok'])
self.dialogLayout.addWidget(self.buttonBox)
self.retranslateUi(editVerseDialog)
=== 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-08-13 19:34:21 +0000
@@ -185,22 +185,3 @@
text = u'---[%s:1]---\n%s' % \
(VerseType.TranslatedNames[VerseType.Verse], text)
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]
- if not value:
- lines = unicode(self.getVerse()[0]).split(u'\n')
- index = 2
- while index < len(lines) and not value:
- value = lines[index]
- index += 1
- if not value:
- critical_error_message_box(
- message=translate('SongsPlugin.EditSongForm',
- 'You need to type some text in to the verse.'))
- return False
- QtGui.QDialog.accept(self)
Follow ups