You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Rename is_a_parent_of() to is_ancestor_of()
This commit is contained in:
@@ -239,13 +239,13 @@ void ScrollContainer::_update_scrollbar_position() {
|
||||
}
|
||||
|
||||
void ScrollContainer::_gui_focus_changed(Control *p_control) {
|
||||
if (follow_focus && is_a_parent_of(p_control)) {
|
||||
if (follow_focus && is_ancestor_of(p_control)) {
|
||||
ensure_control_visible(p_control);
|
||||
}
|
||||
}
|
||||
|
||||
void ScrollContainer::ensure_control_visible(Control *p_control) {
|
||||
ERR_FAIL_COND_MSG(!is_a_parent_of(p_control), "Must be a parent of the control.");
|
||||
ERR_FAIL_COND_MSG(!is_ancestor_of(p_control), "Must be an ancestor of the control.");
|
||||
|
||||
Rect2 global_rect = get_global_rect();
|
||||
Rect2 other_rect = p_control->get_global_rect();
|
||||
|
||||
Reference in New Issue
Block a user