minor fixes

This commit is contained in:
Tim Bentley 2013-09-15 07:37:43 +01:00
parent 5295697677
commit 4d1ba13128
2 changed files with 6 additions and 1 deletions

View File

@ -118,7 +118,7 @@ class Ui_FormattingTagDialog(object):
formatting_tag_dialog.setWindowTitle(translate('OpenLP.FormattingTagDialog', 'Configure Formatting Tags'))
self.delete_button.setText(UiStrings().Delete)
self.new_button.setText(UiStrings().New)
self.tag_table_widget_read_label.setText(translate('OpenLP.FormattingTagDialog', 'Static Formatting'))
self.tag_table_widget_read_label.setText(translate('OpenLP.FormattingTagDialog', 'Default Formatting'))
self.tag_table_widget_read.horizontalHeaderItem(0).\
setText(translate('OpenLP.FormattingTagDialog', 'Description'))
self.tag_table_widget_read.horizontalHeaderItem(1).setText(translate('OpenLP.FormattingTagDialog', 'Tag'))

View File

@ -68,6 +68,7 @@ class FormattingTagForm(QtGui.QDialog, Ui_FormattingTagDialog, FormattingTagCont
self.button_box.rejected.connect(self.close)
# Forces reloading of tags from openlp configuration.
FormattingTags.load_tags()
self.is_deleting = False
def exec_(self):
"""
@ -105,6 +106,7 @@ class FormattingTagForm(QtGui.QDialog, Ui_FormattingTagDialog, FormattingTagCont
"""
selected = self.tag_table_widget.currentRow()
if selected != -1:
self.is_deleting = True
self.tag_table_widget.removeRow(selected)
def accept(self):
@ -160,6 +162,9 @@ class FormattingTagForm(QtGui.QDialog, Ui_FormattingTagDialog, FormattingTagCont
"""
This function processes all user edits in the table. It is called on each cell change.
"""
if self.is_deleting:
self.is_deleting = False
return
# only process for editable rows
if self.tag_table_widget.item(pre_row, 0):
item = self.tag_table_widget.item(pre_row, pre_col)