kivy: fix password_dialog cancel
This commit is contained in:
parent
afa7761d7d
commit
227f3973a6
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue