1
0

kivy: simplify bind

This commit is contained in:
ThomasV
2016-02-04 20:14:11 +01:00
parent 45a0c3b53b
commit 3d42193223
2 changed files with 2 additions and 7 deletions

View File

@@ -18,16 +18,11 @@ class _(str):
return _.lang(s).format(args, kwargs)
@staticmethod
def bind(label, arg):
if not isinstance(label.text, _):
return
if label.bound:
return
def bind(label):
try:
_.observers.add(label)
except:
pass
label.bound = True
# garbage collection
new = set()
for label in _.observers: