From 5ed0a06939967045114975ae17a57c93e3bcb832 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Wed, 30 Jun 2021 11:37:48 +0800 Subject: [PATCH] bugfix --- kivyblocks/baseWidget.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kivyblocks/baseWidget.py b/kivyblocks/baseWidget.py index eb79f91..bf789fe 100755 --- a/kivyblocks/baseWidget.py +++ b/kivyblocks/baseWidget.py @@ -236,7 +236,9 @@ class TimedModal(Modal): Modal.__init__(self, **kw) def open(self, *args, **kw): - self.time_task = Clock.schedule_once(self.dismiss, self.show_time) + if self.show_time > 0: + self.time_task = \ + Clock.schedule_once(self.dismiss, self.show_time) super().open(*args, **kw) def dismiss(self, *args, **kw):