Permalink
Browse files

kinetic: if the widget is not visibla, the on_touch_up event will be …

…removed from available event.

In that case, the dispatch_event in grab state will never work. And may broke all the rest.
So ensure that the on_touch_up event type is registered before dispatching the event.
(Special thanks to nadege for bother me to resolve this bug ^^)
  • Loading branch information...
1 parent b863724 commit 181b913192ea1b04600fd00d4eeaed80ced6dfaa @tito committed Feb 16, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 pymt/ui/widgets/kinetic.py
View
3 pymt/ui/widgets/kinetic.py
@@ -195,6 +195,9 @@ def process_kinetic(self):
if event == 'move':
wid.dispatch_event('on_touch_move', ktouch)
else:
+ # if the widget is not visible, the on_touch_up may have
+ # disabled
+ wid.register_event_type('on_touch_up')
wid.dispatch_event('on_touch_up', ktouch)
ktouch.grab_state = False
ktouch.grab_current = None

0 comments on commit 181b913

Please sign in to comment.