mirror of https://github.com/kivy/kivy.git
Clear refs and anchors when clearing text. Fixes #2250.
This commit is contained in:
parent
11f27e1143
commit
b8167baf07
|
@ -182,12 +182,16 @@ class Label(Widget):
|
|||
After this function call, the :attr:`texture` and :attr:`texture_size`
|
||||
will be updated in this order.
|
||||
'''
|
||||
mrkup = self._label.__class__ is CoreMarkupLabel
|
||||
self.texture = None
|
||||
|
||||
if (not self._label.text or (self.halign[-1] == 'y' or self.strip) and
|
||||
not self._label.text.strip()):
|
||||
self.texture_size = (0, 0)
|
||||
if mrkup:
|
||||
self.refs, self._label._refs = {}, {}
|
||||
self.anchors, self._label._anchors = {}, {}
|
||||
else:
|
||||
mrkup = self._label.__class__ is CoreMarkupLabel
|
||||
if mrkup:
|
||||
text = self._label.text
|
||||
# we must strip here, otherwise, if the last line is empty,
|
||||
|
|
Loading…
Reference in New Issue