From 3169b66d15e983e012b1da181672fef61f3660a0 Mon Sep 17 00:00:00 2001 From: MarianoGNU Date: Sun, 27 Dec 2015 19:06:30 -0300 Subject: [PATCH] fix: TouchScreenButton should stop propagating action when button is removed from scene --- scene/2d/screen_button.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scene/2d/screen_button.cpp b/scene/2d/screen_button.cpp index d7f9b191fe5..fac94f19dc7 100644 --- a/scene/2d/screen_button.cpp +++ b/scene/2d/screen_button.cpp @@ -102,6 +102,10 @@ void TouchScreenButton::_notification(int p_what) { action_id=-1; } } break; + case NOTIFICATION_EXIT_TREE: { + if (is_pressed()) + Input::get_singleton()->action_release(action); + } break; } }