kivy: fix password_dialog cancel

This commit is contained in:
ThomasV 2016-10-14 14:52:24 +02:00
parent afa7761d7d
commit 227f3973a6
1 changed files with 1 additions and 5 deletions

View File

@ -79,7 +79,6 @@ class PasswordDialog(Factory.Popup):
# Factory.Popup.__init__(self)
def init(self, message, callback):
self.pw = None
self.message = message
self.callback = callback
self.ids.kb.password = ''
@ -97,8 +96,5 @@ class PasswordDialog(Factory.Popup):
def on_password(self, pw):
if len(pw) == 6:
self.pw = pw
self.dismiss()
def on_dismiss(self):
Clock.schedule_once(lambda dt: self.callback(self.pw), 0.1)
Clock.schedule_once(lambda dt: self.callback(pw), 0.1)