Fix bug #1212801 where the song edit form did not clear a previously set theme.

Fixes: https://launchpad.net/bugs/1212801
This commit is contained in:
Raoul Snyman 2013-08-15 21:57:23 +02:00
parent 4fac956dca
commit 047a0b3085
1 changed files with 5 additions and 0 deletions

View File

@ -47,6 +47,7 @@ from editsongdialog import Ui_EditSongDialog
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
class EditSongForm(QtGui.QDialog, Ui_EditSongDialog): class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
""" """
Class to manage the editing of a song Class to manage the editing of a song
@ -229,6 +230,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
self.loadTopics() self.loadTopics()
self.loadBooks() self.loadBooks()
self.loadMediaFiles() self.loadMediaFiles()
self.themeComboBox.setEditText(u'')
self.themeComboBox.setCurrentIndex(0) self.themeComboBox.setCurrentIndex(0)
# it's a new song to preview is not possible # it's a new song to preview is not possible
self.previewButton.setVisible(False) self.previewButton.setVisible(False)
@ -261,6 +263,9 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
if self.song.theme_name: if self.song.theme_name:
find_and_set_in_combo_box( find_and_set_in_combo_box(
self.themeComboBox, unicode(self.song.theme_name)) self.themeComboBox, unicode(self.song.theme_name))
else:
self.themeComboBox.setEditText(u'')
self.themeComboBox.setCurrentIndex(0)
self.copyrightEdit.setText( self.copyrightEdit.setText(
self.song.copyright if self.song.copyright else u'') self.song.copyright if self.song.copyright else u'')
self.commentsEdit.setPlainText( self.commentsEdit.setPlainText(