put the dispatching of the on_open event of modalview after the

animation
This commit is contained in:
tshirtman 2012-10-27 19:37:46 +02:00
parent 34d9076fc6
commit 777a46a1f6
1 changed files with 3 additions and 2 deletions

View File

@ -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):