You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Merge pull request #17496 from robfram/fix-f3-change-editor-and-find
Fix pressing `F3` do both changing to script editor AND find next text
This commit is contained in:
@@ -190,6 +190,8 @@ void EditorNode::_unhandled_input(const Ref<InputEvent> &p_event) {
|
|||||||
Ref<InputEventKey> k = p_event;
|
Ref<InputEventKey> k = p_event;
|
||||||
if (k.is_valid() && k->is_pressed() && !k->is_echo() && !gui_base->get_viewport()->gui_has_modal_stack()) {
|
if (k.is_valid() && k->is_pressed() && !k->is_echo() && !gui_base->get_viewport()->gui_has_modal_stack()) {
|
||||||
|
|
||||||
|
EditorPlugin *old_editor = editor_plugin_screen;
|
||||||
|
|
||||||
if (ED_IS_SHORTCUT("editor/next_tab", p_event)) {
|
if (ED_IS_SHORTCUT("editor/next_tab", p_event)) {
|
||||||
int next_tab = editor_data.get_edited_scene() + 1;
|
int next_tab = editor_data.get_edited_scene() + 1;
|
||||||
next_tab %= editor_data.get_edited_scene_count();
|
next_tab %= editor_data.get_edited_scene_count();
|
||||||
@@ -225,6 +227,10 @@ void EditorNode::_unhandled_input(const Ref<InputEvent> &p_event) {
|
|||||||
_bottom_panel_switch(false, i);
|
_bottom_panel_switch(false, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (old_editor != editor_plugin_screen) {
|
||||||
|
get_tree()->set_input_as_handled();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user