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,7 +57,9 @@ class DisplayTagTab(SettingsTab):
user_expands = QtCore.QSettings().value(u'displayTags/html_tags', user_expands = QtCore.QSettings().value(u'displayTags/html_tags',
QtCore.QVariant(u'')).toString() QtCore.QVariant(u'')).toString()
# cPickle only accepts str not unicode strings # cPickle only accepts str not unicode strings
user_tags = cPickle.loads(str(unicode(user_expands).encode(u'utf8'))) 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 # If we have some user ones added them as well
for t in user_tags: for t in user_tags:
DisplayTags.add_html_tag(t) DisplayTags.add_html_tag(t)