aboutsummaryrefslogtreecommitdiff
path: root/editor/plugins/spatial_editor_plugin.cpp
diff options
context:
space:
mode:
authorChaosus2018-02-21 17:14:26 +0300
committerChaosus2018-02-21 17:36:25 +0300
commit24c170555d57ccbbb270f02d0b5d3e98f99b8729 (patch)
treedb84f2dcfe71e2348bf1499fed983615830b3989 /editor/plugins/spatial_editor_plugin.cpp
parentb2412c72a01d2454408d77c79a598f67ba4a5783 (diff)
downloadgodot-24c170555d57ccbbb270f02d0b5d3e98f99b8729.tar.gz
godot-24c170555d57ccbbb270f02d0b5d3e98f99b8729.tar.zst
godot-24c170555d57ccbbb270f02d0b5d3e98f99b8729.zip
Diffstat (limited to 'editor/plugins/spatial_editor_plugin.cpp')
-rw-r--r--editor/plugins/spatial_editor_plugin.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp
index 6fd93c2f2..9e7bfd578 100644
--- a/editor/plugins/spatial_editor_plugin.cpp
+++ b/editor/plugins/spatial_editor_plugin.cpp
@@ -4691,6 +4691,8 @@ void SpatialEditor::_unhandled_key_input(Ref<InputEvent> p_event) {
if (!is_visible_in_tree() || get_viewport()->gui_has_modal_stack())
return;
+ snap_key_enabled = Input::get_singleton()->is_key_pressed(KEY_CONTROL);
+
Ref<InputEventKey> k = p_event;
if (k.is_valid()) {
@@ -4962,6 +4964,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
editor_selection->add_editor_plugin(this);
snap_enabled = false;
+ snap_key_enabled = false;
tool_mode = TOOL_MODE_SELECT;
hbc_menu = memnew(HBoxContainer);