diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-03-16 10:54:44 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-16 10:54:44 -0700 |
commit | 18fa1846ea885a0b75f12702555b621541f787be (patch) | |
tree | 1a386a918ae5c0770fc6cea456ee384b1f4a45ca | |
parent | 376d3dfd03962983668765dd9d7d5905799a62b2 (diff) | |
parent | 05446e8b537f3cd053607824d32cbb651f72839c (diff) |
Merge pull request #27115 from Janglee123/master
Fix toggling snap mode while transforming the Spatial object
-rw-r--r-- | editor/plugins/spatial_editor_plugin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index ad945d7916..765d198f79 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -1021,7 +1021,7 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &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<InputEvent> &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)) { |