From ae36d9de6d5486747c6ffdcc5d84ce31d38747b5 Mon Sep 17 00:00:00 2001 From: Mounir Tohami <53877170+WhalesState@users.noreply.github.com> Date: Thu, 24 Oct 2024 16:18:17 +0300 Subject: [PATCH] Fix `CanvasItemEditor` redraw on key echo (cherry picked from commit 5ca9caa0f88c7ee4c9cad38decf0a064eb126bab) Co-authored-by: Mounir Tohami <53877170+WhalesState@users.noreply.github.com> --- editor/plugins/canvas_item_editor_plugin.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index d81faa1ef93..f2709e6d359 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -493,15 +493,13 @@ real_t CanvasItemEditor::snap_angle(real_t p_target, real_t p_start) const { void CanvasItemEditor::shortcut_input(const Ref &p_ev) { ERR_FAIL_COND(p_ev.is_null()); - - Ref k = p_ev; - if (!is_visible_in_tree()) { return; } + Ref k = p_ev; if (k.is_valid()) { - if (k->get_keycode() == Key::CTRL || k->get_keycode() == Key::ALT || k->get_keycode() == Key::SHIFT) { + if (!k->is_echo() && (k->get_keycode() == Key::CTRL || k->get_keycode() == Key::ALT || k->get_keycode() == Key::SHIFT)) { viewport->queue_redraw(); }