Commit transforms on editor mode switch

This commit is contained in:
Robert Yevdokimov
2024-01-07 11:55:05 -05:00
committed by Robert Yevdokimov
parent 9cd297b6f2
commit 9b0b9ef450
2 changed files with 10 additions and 0 deletions

View File

@ -4546,6 +4546,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);