mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +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:
commit
6d8ec7e7ce
2 changed files with 10 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue