From 0a89ddbc862204270907ace5f8ff01c91a3d83a4 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Wed, 11 Jul 2012 23:05:28 +0200 Subject: [PATCH] fixed traceback when deleting last formatting tag form the list --- openlp/core/ui/formattingtagform.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openlp/core/ui/formattingtagform.py b/openlp/core/ui/formattingtagform.py index e7b996180..3af107224 100644 --- a/openlp/core/ui/formattingtagform.py +++ b/openlp/core/ui/formattingtagform.py @@ -145,6 +145,9 @@ class FormattingTagForm(QtGui.QDialog, Ui_FormattingTagDialog): """ if self.selected != -1: FormattingTags.remove_html_tag(self.selected) + # As the first items are protected we should not have to take care + # of negative indexes causing tracebacks. + self.tagTableWidget.selectRow(self.selected - 1) self.selected = -1 FormattingTags.save_html_tags() self._reloadTable()