Merge pull request #59856 from KoBeWi/touching_spam

Fix TouchScreenButton error spam
This commit is contained in:
Rémi Verschelde 2022-04-04 09:35:48 +02:00 committed by GitHub
commit 25d36e085b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -190,7 +190,7 @@ String TouchScreenButton::get_action() const {
void TouchScreenButton::input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(p_event.is_null());
if (!get_tree()) {
if (!is_visible_in_tree()) {
return;
}
@ -198,8 +198,6 @@ void TouchScreenButton::input(const Ref<InputEvent> &p_event) {
return;
}
ERR_FAIL_COND(!is_visible_in_tree());
const InputEventScreenTouch *st = Object::cast_to<InputEventScreenTouch>(*p_event);
if (passby_press) {