Skip to content

Commit

Permalink
Merge pull request #89121 from KoBeWi/replace_node_type
Browse files Browse the repository at this point in the history
Fix undo action names for node replacement
  • Loading branch information
akien-mga committed Mar 4, 2024
2 parents 790d051 + c1cce6b commit 95085cd
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion editor/plugins/cpu_particles_2d_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ void CPUParticles2DEditorPlugin::_menu_callback(int p_idx) {
gpu_particles->set_process_mode(particles->get_process_mode());

EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Convert to GPUParticles3D"));
ur->create_action(TTR("Convert to GPUParticles3D"), UndoRedo::MERGE_DISABLE, particles);
SceneTreeDock::get_singleton()->replace_node(particles, gpu_particles);
ur->commit_action(false);
} break;
Expand Down
2 changes: 1 addition & 1 deletion editor/plugins/cpu_particles_3d_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void CPUParticles3DEditor::_menu_option(int p_option) {
gpu_particles->set_process_mode(node->get_process_mode());

EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Convert to GPUParticles3D"));
ur->create_action(TTR("Convert to GPUParticles3D"), UndoRedo::MERGE_DISABLE, node);
SceneTreeDock::get_singleton()->replace_node(node, gpu_particles);
ur->commit_action(false);

Expand Down
2 changes: 1 addition & 1 deletion editor/plugins/gpu_particles_2d_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ void GPUParticles2DEditorPlugin::_menu_callback(int p_idx) {
cpu_particles->set_z_index(particles->get_z_index());

EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Convert to CPUParticles2D"));
ur->create_action(TTR("Convert to CPUParticles2D"), UndoRedo::MERGE_DISABLE, particles);
SceneTreeDock::get_singleton()->replace_node(particles, cpu_particles);
ur->commit_action(false);

Expand Down
2 changes: 1 addition & 1 deletion editor/plugins/gpu_particles_3d_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ void GPUParticles3DEditor::_menu_option(int p_option) {
cpu_particles->set_process_mode(node->get_process_mode());

EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Convert to CPUParticles3D"));
ur->create_action(TTR("Convert to CPUParticles3D"), UndoRedo::MERGE_DISABLE, node);
SceneTreeDock::get_singleton()->replace_node(node, cpu_particles);
ur->commit_action(false);

Expand Down
4 changes: 2 additions & 2 deletions editor/plugins/sprite_2d_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ void Sprite2DEditor::_convert_to_mesh_2d_node() {
mesh_instance->set_mesh(mesh);

EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Convert to MeshInstance2D"));
ur->create_action(TTR("Convert to MeshInstance2D"), UndoRedo::MERGE_DISABLE, node);
SceneTreeDock::get_singleton()->replace_node(node, mesh_instance);
ur->commit_action(false);
}
Expand Down Expand Up @@ -394,7 +394,7 @@ void Sprite2DEditor::_convert_to_polygon_2d_node() {
polygon_2d_instance->set_polygons(polys);

EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Convert to Polygon2D"));
ur->create_action(TTR("Convert to Polygon2D"), UndoRedo::MERGE_DISABLE, node);
SceneTreeDock::get_singleton()->replace_node(node, polygon_2d_instance);
ur->commit_action(false);
}
Expand Down

0 comments on commit 95085cd

Please sign in to comment.