From 30d4a50b424c927b178cabfe30302de1e9d4c836 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Mon, 4 Jan 2016 00:17:28 -0300 Subject: Fix KP5 toggle perspective shortcut, fixes #2035 --- tools/editor/plugins/spatial_editor_plugin.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tools/editor/plugins') diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp index f536077f9a..8903e12319 100644 --- a/tools/editor/plugins/spatial_editor_plugin.cpp +++ b/tools/editor/plugins/spatial_editor_plugin.cpp @@ -1617,6 +1617,8 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) { case InputEvent::KEY: { const InputEventKey &k = p_event.key; + if (!k.pressed) + break; switch(k.scancode) { case KEY_S: { @@ -1677,7 +1679,8 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) { } break; case KEY_KP_5: { - orthogonal = !orthogonal; + + //orthogonal = !orthogonal; _menu_option(orthogonal?VIEW_PERSPECTIVE:VIEW_ORTHOGONAL); _update_name(); -- cgit v1.2.3