From 5ee449efec44a1a1ecbcc7eebdb5d768e1decdcf Mon Sep 17 00:00:00 2001 From: Markus Sauermann <6299227+Sauermann@users.noreply.github.com> Date: Mon, 24 Oct 2022 15:59:18 +0200 Subject: Remove unnecessary casts button_add_item and button_add are both Button p_parent is a Node3D CanvasItem can never be cast to Viewport --- scene/main/viewport.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'scene/main') diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index a2963eadd5..1de3caaa97 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1403,10 +1403,6 @@ Control *Viewport::gui_find_control(const Point2 &p_global) { } Control *Viewport::_gui_find_control_at_pos(CanvasItem *p_node, const Point2 &p_global, const Transform2D &p_xform, Transform2D &r_inv_xform) { - if (Object::cast_to(p_node)) { - return nullptr; - } - if (!p_node->is_visible()) { return nullptr; // Canvas item hidden, discard. } -- cgit v1.2.3