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

Merge pull request #86805 from ryevdokimov/clear-nodes-on-ui-cancel-2d

Allow `ui_cancel` to unselect all nodes in all edit modes in 2D, matching 3D behavior
This commit is contained in:
Rémi Verschelde
2024-01-08 11:56:43 +01:00

View File

@@ -2464,7 +2464,7 @@ bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) {
} }
} }
if (k.is_valid() && k->is_action_pressed(SNAME("ui_cancel"), false, true) && drag_type == DRAG_NONE && tool == TOOL_SELECT) { if (k.is_valid() && k->is_action_pressed(SNAME("ui_cancel"), false, true) && drag_type == DRAG_NONE) {
// Unselect everything // Unselect everything
editor_selection->clear(); editor_selection->clear();
viewport->queue_redraw(); viewport->queue_redraw();