← Back to team overview

openlp-core team mailing list archive

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

 

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

Requested reviews:
  OpenLP Core (openlp-core)
Related bugs:
  Bug #812628 in OpenLP: "Mac OS X: unexpected behaviour in song editor: adding existing author to song"
  https://bugs.launchpad.net/openlp/+bug/812628

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

Fixed bug #812628 by manually checking to see if the author name text was in the list of authors.
-- 
https://code.launchpad.net/~raoul-snyman/openlp/bug-812628/+merge/98931
Your team OpenLP Core is requested to review the proposed merge of lp:~raoul-snyman/openlp/bug-812628 into lp:openlp.
=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py	2012-03-12 22:12:16 +0000
+++ openlp/plugins/songs/forms/editsongform.py	2012-03-22 21:35:23 +0000
@@ -361,7 +361,12 @@
 
     def onAuthorAddButtonClicked(self):
         item = int(self.authorsComboBox.currentIndex())
-        text = unicode(self.authorsComboBox.currentText())
+        text = unicode(self.authorsComboBox.currentText()).strip(u' \r\n\t')
+        # This if statement is for OS X, which doesn't seem to work well with
+        # the QCompleter autocompletion class. See bug #812628.
+        if text in self.authors:
+            # Index 0 is a blank string, so add 1
+            item = self.authors.index(text) + 1
         if item == 0 and text:
             if QtGui.QMessageBox.question(self,
                 translate('SongsPlugin.EditSongForm', 'Add Author'),


Follow ups