You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 19:31:35 +00:00
Fix find_next_valid_focus() freeze
This commit is contained in:
@@ -2422,7 +2422,7 @@ Control *Control::find_next_valid_focus() const {
|
||||
}
|
||||
}
|
||||
|
||||
if (next_child == from) { // No next control.
|
||||
if (next_child == from || next_child == this) { // No next control.
|
||||
return (get_focus_mode() == FOCUS_ALL) ? next_child : nullptr;
|
||||
}
|
||||
if (next_child) {
|
||||
@@ -2506,7 +2506,7 @@ Control *Control::find_prev_valid_focus() const {
|
||||
}
|
||||
}
|
||||
|
||||
if (prev_child == from) { // No prev control.
|
||||
if (prev_child == from || prev_child == this) { // No prev control.
|
||||
return (get_focus_mode() == FOCUS_ALL) ? prev_child : nullptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user