forked from openlp/openlp
- When creating/editing a custom slide give the title edit the focus (and not only when creating a new)
- fixed long lines - simplification
This commit is contained in:
parent
c298146b1f
commit
8bb96b97bf
@ -93,7 +93,6 @@ class EditCustomForm(QtGui.QDialog, Ui_CustomEditDialog):
|
|||||||
self.titleEdit.setText(u'')
|
self.titleEdit.setText(u'')
|
||||||
self.creditEdit.setText(u'')
|
self.creditEdit.setText(u'')
|
||||||
self.themeComboBox.setCurrentIndex(0)
|
self.themeComboBox.setCurrentIndex(0)
|
||||||
self.titleEdit.setFocus(QtCore.Qt.OtherFocusReason)
|
|
||||||
else:
|
else:
|
||||||
self.customSlide = self.manager.get_object(CustomSlide, id)
|
self.customSlide = self.manager.get_object(CustomSlide, id)
|
||||||
self.titleEdit.setText(self.customSlide.title)
|
self.titleEdit.setText(self.customSlide.title)
|
||||||
@ -104,10 +103,9 @@ class EditCustomForm(QtGui.QDialog, Ui_CustomEditDialog):
|
|||||||
self.slideListView.addItem(slide[1])
|
self.slideListView.addItem(slide[1])
|
||||||
theme = self.customSlide.theme_name
|
theme = self.customSlide.theme_name
|
||||||
find_and_set_in_combo_box(self.themeComboBox, theme)
|
find_and_set_in_combo_box(self.themeComboBox, theme)
|
||||||
|
self.titleEdit.setFocus(QtCore.Qt.OtherFocusReason)
|
||||||
# If not preview hide the preview button.
|
# If not preview hide the preview button.
|
||||||
self.previewButton.setVisible(False)
|
self.previewButton.setVisible(preview)
|
||||||
if preview:
|
|
||||||
self.previewButton.setVisible(True)
|
|
||||||
|
|
||||||
def reject(self):
|
def reject(self):
|
||||||
Receiver.send_message(u'custom_edit_clear')
|
Receiver.send_message(u'custom_edit_clear')
|
||||||
|
@ -209,9 +209,11 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
|||||||
self.alternativeEdit.setText(u'')
|
self.alternativeEdit.setText(u'')
|
||||||
if self.song.song_book_id != 0:
|
if self.song.song_book_id != 0:
|
||||||
book_name = self.manager.get_object(Book, self.song.song_book_id)
|
book_name = self.manager.get_object(Book, self.song.song_book_id)
|
||||||
find_and_set_in_combo_box(self.songBookComboBox, unicode(book_name.name))
|
find_and_set_in_combo_box(
|
||||||
|
self.songBookComboBox, unicode(book_name.name))
|
||||||
if self.song.theme_name:
|
if self.song.theme_name:
|
||||||
find_and_set_in_combo_box(self.themeComboBox, unicode(self.song.theme_name))
|
find_and_set_in_combo_box(
|
||||||
|
self.themeComboBox, unicode(self.song.theme_name))
|
||||||
if self.song.copyright:
|
if self.song.copyright:
|
||||||
self.copyrightEdit.setText(self.song.copyright)
|
self.copyrightEdit.setText(self.song.copyright)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user