forked from openlp/openlp
Some streamlining of the song edit form.
bzr-revno: 855
This commit is contained in:
commit
cfd1db29f3
@ -294,7 +294,8 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
||||
'exist, do you want to add them?'),
|
||||
QtGui.QMessageBox.Yes | QtGui.QMessageBox.No,
|
||||
QtGui.QMessageBox.Yes) == QtGui.QMessageBox.Yes:
|
||||
author = Author.populate(display_name=text)
|
||||
author = Author.populate(first_name=text.rsplit(u' ', 1)[0],
|
||||
last_name=text.rsplit(u' ', 1)[1], display_name=text)
|
||||
self.songmanager.save_author(author)
|
||||
self.song.authors.append(author)
|
||||
author_item = QtGui.QListWidgetItem(unicode(author.display_name))
|
||||
|
@ -172,6 +172,13 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
||||
author_id = self._getCurrentItemId(self.AuthorsListWidget)
|
||||
if author_id != -1:
|
||||
author = self.songmanager.get_author(author_id)
|
||||
# Just make sure none of the fields is None
|
||||
if author.first_name is None:
|
||||
author.first_name = u''
|
||||
if author.last_name is None:
|
||||
author.last_name = u''
|
||||
if author.display_name is None:
|
||||
author.display_name = u''
|
||||
self.authorform.setAutoDisplayName(False)
|
||||
self.authorform.FirstNameEdit.setText(author.first_name)
|
||||
self.authorform.LastNameEdit.setText(author.last_name)
|
||||
|
@ -218,6 +218,7 @@ class SongMediaItem(MediaManagerItem):
|
||||
Clear the search text.
|
||||
"""
|
||||
self.SearchTextEdit.clear()
|
||||
self.onSearchTextButtonClick()
|
||||
|
||||
def onSearchTextEditChanged(self, text):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user