1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

Do not commit transforms and handles if no changes were made

This commit is contained in:
Robert Yevdokimov
2024-01-13 22:49:20 -05:00
parent 26b1fd0d84
commit f2f3f17de8
9 changed files with 69 additions and 48 deletions

View File

@@ -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("");