From 80943d77a4318822f888ea81e87d77c53d6047d7 Mon Sep 17 00:00:00 2001 From: volzhs Date: Tue, 11 Aug 2015 22:39:59 +0900 Subject: [PATCH 1/2] prevent to change tool mode when control or shift key is pressed --- tools/editor/plugins/canvas_item_editor_plugin.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/editor/plugins/canvas_item_editor_plugin.cpp b/tools/editor/plugins/canvas_item_editor_plugin.cpp index f2738f0a62c..9469b79ea07 100644 --- a/tools/editor/plugins/canvas_item_editor_plugin.cpp +++ b/tools/editor/plugins/canvas_item_editor_plugin.cpp @@ -144,6 +144,9 @@ void CanvasItemEditor::_unhandled_key_input(const InputEvent& p_ev) { if (!is_visible()) return; + if (p_ev.key.mod.control || p_ev.key.mod.shift) + // prevent to change tool mode when control or shift key is pressed + return; if (p_ev.key.pressed && !p_ev.key.echo && p_ev.key.scancode==KEY_Q) _tool_select(TOOL_SELECT); if (p_ev.key.pressed && !p_ev.key.echo && p_ev.key.scancode==KEY_W) From edabbcd064372ff036e01735f6b236f472d80c93 Mon Sep 17 00:00:00 2001 From: volzhs Date: Tue, 11 Aug 2015 22:52:43 +0900 Subject: [PATCH 2/2] remove shift key check because shift + v in use with tool mode --- tools/editor/plugins/canvas_item_editor_plugin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/editor/plugins/canvas_item_editor_plugin.cpp b/tools/editor/plugins/canvas_item_editor_plugin.cpp index 9469b79ea07..e2f39b85ab3 100644 --- a/tools/editor/plugins/canvas_item_editor_plugin.cpp +++ b/tools/editor/plugins/canvas_item_editor_plugin.cpp @@ -144,8 +144,8 @@ void CanvasItemEditor::_unhandled_key_input(const InputEvent& p_ev) { if (!is_visible()) return; - if (p_ev.key.mod.control || p_ev.key.mod.shift) - // prevent to change tool mode when control or shift key is pressed + if (p_ev.key.mod.control) + // prevent to change tool mode when control key is pressed return; if (p_ev.key.pressed && !p_ev.key.echo && p_ev.key.scancode==KEY_Q) _tool_select(TOOL_SELECT);