Use proper cid in codeinput cache.

This commit is contained in:
Matthew Einhorn 2014-07-06 14:14:56 -04:00
parent 43d5fc5fc4
commit 3be23fc657
1 changed files with 2 additions and 4 deletions

View File

@ -91,7 +91,7 @@ class CodeInput(TextInput):
ntext = u'*' * len(ntext)
ntext = self._get_bbcode(ntext)
kw = self._get_line_options()
cid = '%s\0%s' % (ntext, str(kw))
cid = u'{}\0{}\0{}'.format(ntext, self.password, kw)
texture = Cache_get('textinput.label', cid)
if texture is None:
@ -128,9 +128,7 @@ class CodeInput(TextInput):
return width
lbl = self._create_line_label(text)
width = lbl.width
Cache_append(
'textinput.width',
text + u'_' + repr(self._get_line_options()), width)
Cache_append('textinput.width', cid, width)
return width
def _get_bbcode(self, ntext):