From 9bd25ce7d2c9af3daba17a41d0be192814ad47f3 Mon Sep 17 00:00:00 2001 From: janglee123 Date: Sat, 16 Mar 2019 13:45:39 +0530 Subject: [PATCH] fixed toggelling snap mode while transforming (cherry picked from commit 05446e8b537f3cd053607824d32cbb651f72839c) --- editor/plugins/spatial_editor_plugin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index ad945d7916d..765d198f795 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -1021,7 +1021,7 @@ void SpatialEditorViewport::_sinput(const Ref &p_event) { } _edit.mouse_pos = b->get_position(); - _edit.snap = false; + _edit.snap = spatial_editor->is_snap_enabled(); _edit.mode = TRANSFORM_NONE; //gizmo has priority over everything @@ -1772,7 +1772,7 @@ void SpatialEditorViewport::_sinput(const Ref &p_event) { if (ED_IS_SHORTCUT("spatial_editor/snap", p_event)) { if (_edit.mode != TRANSFORM_NONE) { - _edit.snap = true; + _edit.snap = !_edit.snap; } } if (ED_IS_SHORTCUT("spatial_editor/bottom_view", p_event)) {