mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-11 13:21:10 +01:00
Fix find_next_valid_focus() freeze
(cherry picked from commit 8d62b736b2fceb60a76ff916c8f904e25fece832)
This commit is contained in:
parent
ac81f33921
commit
0da3dcc5b4
@ -1906,7 +1906,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) {
|
||||
@ -1990,7 +1990,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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user