forked from openlp/openlp
Fix code so we can save songs
This commit is contained in:
parent
94d3280b0c
commit
38f8005d5d
@ -380,11 +380,10 @@ class Ui_EditSongDialog(object):
|
|||||||
self.verticalLayout.addWidget(self.ButtonBox)
|
self.verticalLayout.addWidget(self.ButtonBox)
|
||||||
|
|
||||||
self.retranslateUi(EditSongDialog)
|
self.retranslateUi(EditSongDialog)
|
||||||
self.SongTabWidget.setCurrentIndex(0)
|
|
||||||
QtCore.QObject.connect(self.ButtonBox,
|
QtCore.QObject.connect(self.ButtonBox,
|
||||||
QtCore.SIGNAL(u'rejected()'), EditSongDialog.close)
|
QtCore.SIGNAL(u'rejected()'), EditSongDialog.close)
|
||||||
QtCore.QObject.connect(self.ButtonBox,
|
QtCore.QObject.connect(self.ButtonBox,
|
||||||
QtCore.SIGNAL(u'accepted()'), EditSongDialog.close)
|
QtCore.SIGNAL(u'accepted()'), EditSongDialog.accept)
|
||||||
QtCore.QMetaObject.connectSlotsByName(EditSongDialog)
|
QtCore.QMetaObject.connectSlotsByName(EditSongDialog)
|
||||||
EditSongDialog.setTabOrder(self.SongTabWidget, self.TitleEditItem)
|
EditSongDialog.setTabOrder(self.SongTabWidget, self.TitleEditItem)
|
||||||
EditSongDialog.setTabOrder(self.TitleEditItem, self.AlternativeEdit)
|
EditSongDialog.setTabOrder(self.TitleEditItem, self.AlternativeEdit)
|
||||||
|
@ -122,6 +122,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
|||||||
|
|
||||||
def newSong(self):
|
def newSong(self):
|
||||||
log.debug(u'New Song')
|
log.debug(u'New Song')
|
||||||
|
self.SongTabWidget.setCurrentIndex(0)
|
||||||
self.song = Song()
|
self.song = Song()
|
||||||
self.TitleEditItem.setText(u'')
|
self.TitleEditItem.setText(u'')
|
||||||
self.AlternativeEdit.setText(u'')
|
self.AlternativeEdit.setText(u'')
|
||||||
@ -140,6 +141,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
|||||||
|
|
||||||
def loadSong(self, id):
|
def loadSong(self, id):
|
||||||
log.debug(u'Load Song')
|
log.debug(u'Load Song')
|
||||||
|
self.SongTabWidget.setCurrentIndex(0)
|
||||||
self.loadAuthors()
|
self.loadAuthors()
|
||||||
self.loadTopics()
|
self.loadTopics()
|
||||||
self.loadBooks()
|
self.loadBooks()
|
||||||
@ -341,8 +343,8 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
|||||||
self.loadBooks()
|
self.loadBooks()
|
||||||
self.loadTopics()
|
self.loadTopics()
|
||||||
|
|
||||||
def onAccept(self):
|
def accept(self):
|
||||||
log.debug(u'OnAccept')
|
log.debug(u'accept')
|
||||||
if not self._validate_song():
|
if not self._validate_song():
|
||||||
return
|
return
|
||||||
self.song.title = unicode(self.TitleEditItem.displayText())
|
self.song.title = unicode(self.TitleEditItem.displayText())
|
||||||
|
Loading…
Reference in New Issue
Block a user