Fix bug 1537212

Fixes: https://launchpad.net/bugs/1537212
This commit is contained in:
Samuel Mehrbrodt 2016-01-30 09:33:31 +01:00
parent ddfed93fbe
commit a409306d0d

View File

@ -324,7 +324,7 @@ class EditSongForm(QtWidgets.QDialog, Ui_EditSongDialog, RegistryProperties):
if self.topics_combo_box.hasFocus() and self.topics_combo_box.currentText():
self.on_topic_add_button_clicked()
return
if self.songbooks_combo_box.hasFocus() and self.songbooks_combo_box.currentText():
if self.songbooks_combo_box.hasFocus() or self.songbook_entry_edit.hasFocus():
self.on_songbook_add_button_clicked()
return
QtWidgets.QDialog.keyPressEvent(self, event)
@ -514,6 +514,7 @@ class EditSongForm(QtWidgets.QDialog, Ui_EditSongDialog, RegistryProperties):
topic_name.setData(QtCore.Qt.UserRole, topic.id)
self.topics_list_view.addItem(topic_name)
self.songbooks_list_view.clear()
self.songbook_entry_edit.clear()
for songbook_entry in self.song.songbook_entries:
self.add_songbook_entry_to_list(songbook_entry.songbook.id, songbook_entry.songbook.name,
songbook_entry.entry)