1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Merge pull request #71156 from EricEzaM/71113-cancelling-node-selection-with-escape-breaks-shape-editing-undo

Fix cancelling selection (pressing escape) while gizmo editing making uncommitted changes.
This commit is contained in:
Rémi Verschelde
2023-03-07 12:03:42 +01:00
3 changed files with 12 additions and 0 deletions

View File

@@ -2103,6 +2103,11 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
}
if (_edit.mode == TRANSFORM_NONE) {
if (_edit.gizmo.is_valid()) {
// Restore.
_edit.gizmo->commit_handle(_edit.gizmo_handle, _edit.gizmo_handle_secondary, _edit.gizmo_initial_value, true);
_edit.gizmo = Ref<EditorNode3DGizmo>();
}
if (k->get_keycode() == Key::ESCAPE && !cursor.region_select) {
_clear_selected();
return;