mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 07:53:26 +00:00
Merge pull request #111542 from sockeye-d/script-editor-allow-echo
Allow keyboard echo for ScriptEditor tab manipulation events
This commit is contained in:
commit
0b47123768
1 changed files with 5 additions and 1 deletions
|
@ -3445,7 +3445,7 @@ void ScriptEditor::input(const Ref<InputEvent> &p_event) {
|
||||||
void ScriptEditor::shortcut_input(const Ref<InputEvent> &p_event) {
|
void ScriptEditor::shortcut_input(const Ref<InputEvent> &p_event) {
|
||||||
ERR_FAIL_COND(p_event.is_null());
|
ERR_FAIL_COND(p_event.is_null());
|
||||||
|
|
||||||
if (!is_visible_in_tree() || !p_event->is_pressed() || p_event->is_echo()) {
|
if (!is_visible_in_tree() || !p_event->is_pressed()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ED_IS_SHORTCUT("script_editor/next_script", p_event)) {
|
if (ED_IS_SHORTCUT("script_editor/next_script", p_event)) {
|
||||||
|
@ -3475,6 +3475,10 @@ void ScriptEditor::shortcut_input(const Ref<InputEvent> &p_event) {
|
||||||
accept_event();
|
accept_event();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (p_event->is_echo()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Callable custom_callback = EditorContextMenuPluginManager::get_singleton()->match_custom_shortcut(EditorContextMenuPlugin::CONTEXT_SLOT_SCRIPT_EDITOR, p_event);
|
Callable custom_callback = EditorContextMenuPluginManager::get_singleton()->match_custom_shortcut(EditorContextMenuPlugin::CONTEXT_SLOT_SCRIPT_EDITOR, p_event);
|
||||||
if (custom_callback.is_valid()) {
|
if (custom_callback.is_valid()) {
|
||||||
Ref<Resource> resource;
|
Ref<Resource> resource;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue