forked from openlp/openlp
fixed ticket 502
This commit is contained in:
parent
b909d27b3b
commit
cf59d89afa
@ -707,7 +707,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
|||||||
text = unicode(self.songBookComboBox.currentText())
|
text = unicode(self.songBookComboBox.currentText())
|
||||||
if item == 0 and text:
|
if item == 0 and text:
|
||||||
temp_song_book = text
|
temp_song_book = text
|
||||||
self.mediaitem.songMaintenanceForm.exec_()
|
self.mediaitem.songMaintenanceForm.exec_(True)
|
||||||
self.loadAuthors()
|
self.loadAuthors()
|
||||||
self.loadBooks()
|
self.loadBooks()
|
||||||
self.loadTopics()
|
self.loadTopics()
|
||||||
|
@ -87,7 +87,15 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
|||||||
QtCore.SIGNAL(u'currentRowChanged(int)'),
|
QtCore.SIGNAL(u'currentRowChanged(int)'),
|
||||||
self.onBooksListRowChanged)
|
self.onBooksListRowChanged)
|
||||||
|
|
||||||
def exec_(self):
|
def exec_(self, from_song_edit=False):
|
||||||
|
"""
|
||||||
|
Show the dialog.
|
||||||
|
|
||||||
|
``from_song_edit``
|
||||||
|
Indicates if the maintenance dialog has been opened from song edit
|
||||||
|
or from the media manager. Defaults to **False**.
|
||||||
|
"""
|
||||||
|
self.from_song_edit = from_song_edit
|
||||||
self.typeListWidget.setCurrentRow(0)
|
self.typeListWidget.setCurrentRow(0)
|
||||||
self.resetAuthors()
|
self.resetAuthors()
|
||||||
self.resetTopics()
|
self.resetTopics()
|
||||||
@ -275,7 +283,8 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
|||||||
if self.checkAuthor(author, True):
|
if self.checkAuthor(author, True):
|
||||||
if self.manager.save_object(author):
|
if self.manager.save_object(author):
|
||||||
self.resetAuthors()
|
self.resetAuthors()
|
||||||
Receiver.send_message(u'songs_load_list')
|
if not self.from_song_edit:
|
||||||
|
Receiver.send_message(u'songs_load_list')
|
||||||
else:
|
else:
|
||||||
critical_error_message_box(
|
critical_error_message_box(
|
||||||
message=translate('SongsPlugin.SongMaintenanceForm',
|
message=translate('SongsPlugin.SongMaintenanceForm',
|
||||||
@ -373,7 +382,8 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
|||||||
Receiver.send_message(u'cursor_busy')
|
Receiver.send_message(u'cursor_busy')
|
||||||
merge(dbObject)
|
merge(dbObject)
|
||||||
reset()
|
reset()
|
||||||
Receiver.send_message(u'songs_load_list')
|
if not self.from_song_edit:
|
||||||
|
Receiver.send_message(u'songs_load_list')
|
||||||
Receiver.send_message(u'cursor_normal')
|
Receiver.send_message(u'cursor_normal')
|
||||||
|
|
||||||
def mergeAuthors(self, old_author):
|
def mergeAuthors(self, old_author):
|
||||||
|
Loading…
Reference in New Issue
Block a user