openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #09512
[Merge] lp:~googol-hush/openlp/bug-789929 into lp:openlp
Andreas Preikschat has proposed merging lp:~googol-hush/openlp/bug-789929 into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
Bug #789929 in OpenLP: "Display Tags cannot be deleted"
https://bugs.launchpad.net/openlp/+bug/789929
For more details, see:
https://code.launchpad.net/~googol-hush/openlp/bug-789929/+merge/62892
Hello,
- Fixed bug #789929 (Display Tags cannot be deleted)
--
https://code.launchpad.net/~googol-hush/openlp/bug-789929/+merge/62892
Your team OpenLP Core is requested to review the proposed merge of lp:~googol-hush/openlp/bug-789929 into lp:openlp.
=== modified file 'openlp/core/ui/displaytagform.py'
--- openlp/core/ui/displaytagform.py 2011-05-26 18:00:25 +0000
+++ openlp/core/ui/displaytagform.py 2011-05-30 15:15:52 +0000
@@ -147,6 +147,7 @@
DisplayTags.remove_html_tag(self.selected)
self.selected = -1
self._resetTable()
+ self._saveTable()
def onSavedPushed(self):
"""
@@ -171,14 +172,19 @@
html[u'end tag'] = u'{/%s}' % tag
self.selected = -1
self._resetTable()
- temp = []
+ self._saveTable()
+
+ def _saveTable(self):
+ """
+ Saves all display tags except protected ones.
+ """
+ tags = []
for tag in DisplayTags.get_html_tags():
if not tag[u'protected']:
- temp.append(tag)
- if temp:
- ctemp = cPickle.dumps(temp)
+ tags.append(tag)
+ if tags:
QtCore.QSettings().setValue(u'displayTags/html_tags',
- QtCore.QVariant(ctemp))
+ QtCore.QVariant(cPickle.dumps(tags)))
else:
QtCore.QSettings().setValue(u'displayTags/html_tags',
QtCore.QVariant(u''))
Follow ups