Merge pull request #86930 from ryevdokimov/commit-transforms-on-mode-switch

Commit transforms done with editor gizmo on tool mode switch.
This commit is contained in:
Thaddeus Crews
2025-11-24 16:00:07 -06:00
2 changed files with 10 additions and 0 deletions

View File

@ -4639,6 +4639,10 @@ void CanvasItemEditor::_button_toggle_grid_snap(bool p_status) {
}
void CanvasItemEditor::_button_tool_select(int p_index) {
if (drag_type != DRAG_NONE) {
_commit_drag();
}
Button *tb[TOOL_MAX] = { select_button, list_select_button, move_button, scale_button, rotate_button, pivot_button, pan_button, ruler_button };
for (int i = 0; i < TOOL_MAX; i++) {
tb[i]->set_pressed(i == p_index);