This commit is contained in:
Raoul Snyman 2010-09-17 21:02:25 +02:00
parent c54450377f
commit 794493d0d1

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