From 777a46a1f696af719f3f6fa2037d7accbc70b2bd Mon Sep 17 00:00:00 2001 From: tshirtman Date: Sat, 27 Oct 2012 19:37:46 +0200 Subject: [PATCH] put the dispatching of the on_open event of modalview after the animation --- kivy/uix/modalview.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kivy/uix/modalview.py b/kivy/uix/modalview.py index 1ed15af5b..77d117ac2 100644 --- a/kivy/uix/modalview.py +++ b/kivy/uix/modalview.py @@ -167,8 +167,9 @@ class ModalView(AnchorLayout): self._window.add_widget(self) self._window.bind(on_resize=self._align_center) self.center = self._window.center - Animation(_anim_alpha=1., d=self._anim_duration).start(self) - self.dispatch('on_open') + a = Animation(_anim_alpha=1., d=self._anim_duration) + a.bind(on_complete=lambda *x: self.dispatch('on_open')) + a.start(self) return self def dismiss(self, *largs, **kwargs):