Fix undo action names for node replacement

This commit is contained in:
kobewi 2024-03-03 19:09:25 +01:00
parent f2045ba822
commit c1cce6bb69
5 changed files with 6 additions and 6 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);
}
@ -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);
}