mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 14:11:15 +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:
commit
c3c425c25f
3 changed files with 12 additions and 0 deletions
|
|
@ -356,6 +356,7 @@ bool CollisionShape2DEditor::forward_canvas_gui_input(const Ref<InputEvent> &p_e
|
|||
return false;
|
||||
}
|
||||
|
||||
original_point = handles[edit_handle];
|
||||
original = get_handle_value(edit_handle);
|
||||
original_transform = node->get_global_transform();
|
||||
last_point = original;
|
||||
|
|
@ -572,6 +573,11 @@ void CollisionShape2DEditor::edit(Node *p_node) {
|
|||
_get_current_shape_type();
|
||||
|
||||
} else {
|
||||
if (pressed) {
|
||||
set_handle(edit_handle, original_point);
|
||||
pressed = false;
|
||||
}
|
||||
|
||||
edit_handle = -1;
|
||||
shape_type = -1;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue