summaryrefslogtreecommitdiffstats
path: root/tools/editor/plugins/canvas_item_editor_plugin.cpp
diff options
context:
space:
mode:
authorMarianoGNU <marianognu.easyrpg@gmail.com>2015-10-17 23:38:33 -0300
committerMarianoGNU <marianognu.easyrpg@gmail.com>2015-10-17 23:38:33 -0300
commit4452e262539ad9d52a5980305584d897829986d1 (patch)
treecde7f3bdc36e727a21f55938a131083f84e043a6 /tools/editor/plugins/canvas_item_editor_plugin.cpp
parent68fb30aaea0acf3ff279831d2d77b2e7129e4b69 (diff)
parent97f483af0a3e040f73c2df957bd092af2f6c085b (diff)
downloadredot-engine-4452e262539ad9d52a5980305584d897829986d1.tar.gz
Merge branch 'master' of https://github.com/okamstudio/godot
Diffstat (limited to 'tools/editor/plugins/canvas_item_editor_plugin.cpp')
-rw-r--r--tools/editor/plugins/canvas_item_editor_plugin.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/editor/plugins/canvas_item_editor_plugin.cpp b/tools/editor/plugins/canvas_item_editor_plugin.cpp
index 8fc2945450..d318f6f6fa 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)
+ // 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);
if (p_ev.key.pressed && !p_ev.key.echo && p_ev.key.scancode==KEY_W)
@@ -1281,7 +1284,7 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) {
if (p_event.type==InputEvent::MOUSE_MOTION) {
- if (!viewport->has_focus())
+ if (!viewport->has_focus() && (!get_focus_owner() || !get_focus_owner()->is_text_field()))
viewport->call_deferred("grab_focus");
const InputEventMouseMotion &m=p_event.mouse_motion;