Remove get_focus_owner() from Control, replaced by get_viewport()->gui_get_focus_owner()
This commit is contained in:
parent
36880714e4
commit
73e784de1e
13 changed files with 12 additions and 26 deletions
|
|
@ -122,7 +122,7 @@ void FindReplaceBar::unhandled_input(const Ref<InputEvent> &p_event) {
|
|||
return;
|
||||
}
|
||||
|
||||
Control *focus_owner = get_focus_owner();
|
||||
Control *focus_owner = get_viewport()->gui_get_focus_owner();
|
||||
if (text_editor->has_focus() || (focus_owner && vbc_lineedit->is_ancestor_of(focus_owner))) {
|
||||
bool accepted = true;
|
||||
|
||||
|
|
@ -724,7 +724,7 @@ void CodeTextEditor::input(const Ref<InputEvent> &event) {
|
|||
}
|
||||
|
||||
if (!text_editor->has_focus()) {
|
||||
if ((find_replace_bar != nullptr && find_replace_bar->is_visible()) && (find_replace_bar->has_focus() || find_replace_bar->is_ancestor_of(get_focus_owner()))) {
|
||||
if ((find_replace_bar != nullptr && find_replace_bar->is_visible()) && (find_replace_bar->has_focus() || find_replace_bar->is_ancestor_of(get_viewport()->gui_get_focus_owner()))) {
|
||||
if (ED_IS_SHORTCUT("script_text_editor/find_next", key_event)) {
|
||||
find_replace_bar->search_next();
|
||||
accept_event();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue