Skip to content

Commit

Permalink
Fix CanvasItemEditor redraw on key echo
Browse files Browse the repository at this point in the history
(cherry picked from commit blazium-engine/blazium@5ca9caa)

Co-authored-by: Mounir Tohami <[email protected]>
  • Loading branch information
WhalesState authored and Spartan322 committed Oct 25, 2024
1 parent 9056ffe commit d09a29e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions editor/plugins/canvas_item_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -493,15 +493,13 @@ real_t CanvasItemEditor::snap_angle(real_t p_target, real_t p_start) const {

void CanvasItemEditor::shortcut_input(const Ref<InputEvent> &p_ev) {
ERR_FAIL_COND(p_ev.is_null());

Ref<InputEventKey> k = p_ev;

if (!is_visible_in_tree()) {
return;
}

Ref<InputEventKey> 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();
}

Expand Down

0 comments on commit d09a29e

Please sign in to comment.