1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-05 19:31:35 +00:00

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

@@ -7370,6 +7370,12 @@ void Node3DEditor::_menu_item_pressed(int p_option) {
case MENU_TOOL_SCALE:
case MENU_TOOL_TRANSFORM:
case MENU_TOOL_LIST_SELECT: {
for (uint32_t i = 0; i < VIEWPORTS_COUNT; i++) {
if (viewports[i]->_edit.mode != Node3DEditorViewport::TRANSFORM_NONE) {
viewports[i]->commit_transform();
}
}
for (int i = 0; i < TOOL_MAX; i++) {
tool_button[i]->set_pressed(i == p_option);
}