bzr-revno: 1039
This commit is contained in:
Raoul Snyman 2010-09-17 21:38:12 +02:00
commit 85732d6ad8
1 changed files with 5 additions and 0 deletions

View File

@ -621,6 +621,10 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
self.close()
def saveSong(self):
"""
Get all the data from the widgets on the form, and then save it to the
database.
"""
self.song.title = unicode(self.TitleEditItem.text())
self.song.alternate_title = unicode(self.AlternativeEdit.text())
self.song.copyright = unicode(self.CopyrightEditItem.text())
@ -646,6 +650,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
self.song.topics.append(self.songmanager.get_object(Topic,
topicId))
self.songmanager.save_object(self.song)
self.song = None
return True
return False