summaryrefslogtreecommitdiffstats
path: root/editor/plugins/node_3d_editor_plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/node_3d_editor_plugin.cpp')
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index e4d24832bf..687ed82732 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -1870,7 +1870,9 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
surface->queue_redraw();
} else {
if (_edit.gizmo.is_valid()) {
- _edit.gizmo->commit_handle(_edit.gizmo_handle, _edit.gizmo_handle_secondary, _edit.gizmo_initial_value, false);
+ if (_edit.original_mouse_pos != _edit.mouse_pos) {
+ _edit.gizmo->commit_handle(_edit.gizmo_handle, _edit.gizmo_handle_secondary, _edit.gizmo_initial_value, false);
+ }
_edit.gizmo = Ref<EditorNode3DGizmo>();
break;
}
@@ -1904,7 +1906,9 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
se->gizmo->commit_subgizmos(ids, restore, false);
} else {
- commit_transform();
+ if (_edit.original_mouse_pos != _edit.mouse_pos) {
+ commit_transform();
+ }
}
_edit.mode = TRANSFORM_NONE;
set_message("");