improvement + fix

This commit is contained in:
andreas 2010-07-21 15:13:03 +02:00
parent 2691636e71
commit c4a59586a6
2 changed files with 3 additions and 1 deletions

View File

@ -291,7 +291,7 @@ 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:
if text.find(' ') == -1:
if text.find(u' ') == -1:
author = Author.populate(first_name=u'', last_name=u'',
display_name=text)
else:

View File

@ -350,6 +350,8 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
book_id = self._getCurrentItemId(self.BooksListWidget)
if book_id != -1:
book = self.songmanager.get_object(Book, book_id)
if book.publisher is None:
book.publisher = u''
self.bookform.NameEdit.setText(book.name)
self.bookform.PublisherEdit.setText(book.publisher)
# Save the book's name and publisher for the case that they have to