mirror of
https://github.com/tiennm99/godot.git
synced 2026-08-11 00:24:58 +00:00
Remove unnecessary casts
button_add_item and button_add are both Button p_parent is a Node3D CanvasItem can never be cast to Viewport
This commit is contained in:
@@ -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<Viewport>(p_node)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (!p_node->is_visible()) {
|
||||
return nullptr; // Canvas item hidden, discard.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user