From 6c1430d3c2715fef81ea5ab8dd6ede057bdce7fe Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Thu, 1 Mar 2012 23:45:19 +0100 Subject: [PATCH] button: fix grabbing priority in touch move/up --- kivy/uix/button.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kivy/uix/button.py b/kivy/uix/button.py index ce4f217e6..781240176 100644 --- a/kivy/uix/button.py +++ b/kivy/uix/button.py @@ -126,15 +126,15 @@ class Button(Label): return True def on_touch_move(self, touch): + if touch.grab_current is self: + return True if super(Button, self).on_touch_move(touch): return True return self in touch.ud def on_touch_up(self, touch): - if super(Button, self).on_touch_up(touch): - return True if touch.grab_current is not self: - return + return super(Button, self).on_touch_up(touch) assert(self in touch.ud) touch.ungrab(self) self._do_release()