Fix first time initialiation

This commit is contained in:
Tim Bentley 2011-01-09 17:17:42 +00:00
parent c4891f27ed
commit 39ff8e2bc4
1 changed files with 6 additions and 4 deletions

View File

@ -57,10 +57,12 @@ class DisplayTagTab(SettingsTab):
user_expands = QtCore.QSettings().value(u'displayTags/html_tags',
QtCore.QVariant(u'')).toString()
# cPickle only accepts str not unicode strings
user_tags = cPickle.loads(str(unicode(user_expands).encode(u'utf8')))
# If we have some user ones added them as well
for t in user_tags:
DisplayTags.add_html_tag(t)
user_expands_string = str(unicode(user_expands).encode(u'utf8'))
if user_expands_string:
user_tags = cPickle.loads(user_expand_string)
# If we have some user ones added them as well
for t in user_tags:
DisplayTags.add_html_tag(t)
self.selected = -1
def setupUi(self):