diff options
| author | Chaosus | 2018-02-21 17:14:26 +0300 |
|---|---|---|
| committer | Hein-Pieter van Braam | 2018-02-21 22:16:20 +0100 |
| commit | c6a96fc3607c050fd064946fe3a6ac23a66dbd76 (patch) | |
| tree | 13b76393e7e847b21fe4be69f18dd533ff319895 /editor/plugins/spatial_editor_plugin.cpp | |
| parent | 4383fae5a45be1496704f4299bd7d9aa43afb91b (diff) | |
| download | godot-c6a96fc3607c050fd064946fe3a6ac23a66dbd76.tar.gz godot-c6a96fc3607c050fd064946fe3a6ac23a66dbd76.tar.zst godot-c6a96fc3607c050fd064946fe3a6ac23a66dbd76.zip | |
Enable snapping when control key pressed
(cherry picked from commit 24c170555d57ccbbb270f02d0b5d3e98f99b8729)
Diffstat (limited to '')
| -rw-r--r-- | editor/plugins/spatial_editor_plugin.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index 63762651d..fa7a2269d 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -4674,6 +4674,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()) { @@ -4941,6 +4943,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); |
