Fix undo action names for node replacement
This commit is contained in:
parent
f2045ba822
commit
c1cce6bb69
5 changed files with 6 additions and 6 deletions
|
@ -86,7 +86,7 @@ void CPUParticles2DEditorPlugin::_menu_callback(int p_idx) {
|
||||||
gpu_particles->set_process_mode(particles->get_process_mode());
|
gpu_particles->set_process_mode(particles->get_process_mode());
|
||||||
|
|
||||||
EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
|
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);
|
SceneTreeDock::get_singleton()->replace_node(particles, gpu_particles);
|
||||||
ur->commit_action(false);
|
ur->commit_action(false);
|
||||||
} break;
|
} break;
|
||||||
|
|
|
@ -72,7 +72,7 @@ void CPUParticles3DEditor::_menu_option(int p_option) {
|
||||||
gpu_particles->set_process_mode(node->get_process_mode());
|
gpu_particles->set_process_mode(node->get_process_mode());
|
||||||
|
|
||||||
EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
|
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);
|
SceneTreeDock::get_singleton()->replace_node(node, gpu_particles);
|
||||||
ur->commit_action(false);
|
ur->commit_action(false);
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,7 @@ void GPUParticles2DEditorPlugin::_menu_callback(int p_idx) {
|
||||||
cpu_particles->set_z_index(particles->get_z_index());
|
cpu_particles->set_z_index(particles->get_z_index());
|
||||||
|
|
||||||
EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
|
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);
|
SceneTreeDock::get_singleton()->replace_node(particles, cpu_particles);
|
||||||
ur->commit_action(false);
|
ur->commit_action(false);
|
||||||
|
|
||||||
|
|
|
@ -279,7 +279,7 @@ void GPUParticles3DEditor::_menu_option(int p_option) {
|
||||||
cpu_particles->set_process_mode(node->get_process_mode());
|
cpu_particles->set_process_mode(node->get_process_mode());
|
||||||
|
|
||||||
EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
|
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);
|
SceneTreeDock::get_singleton()->replace_node(node, cpu_particles);
|
||||||
ur->commit_action(false);
|
ur->commit_action(false);
|
||||||
|
|
||||||
|
|
|
@ -339,7 +339,7 @@ void Sprite2DEditor::_convert_to_mesh_2d_node() {
|
||||||
mesh_instance->set_mesh(mesh);
|
mesh_instance->set_mesh(mesh);
|
||||||
|
|
||||||
EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
|
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);
|
SceneTreeDock::get_singleton()->replace_node(node, mesh_instance);
|
||||||
ur->commit_action(false);
|
ur->commit_action(false);
|
||||||
}
|
}
|
||||||
|
@ -394,7 +394,7 @@ void Sprite2DEditor::_convert_to_polygon_2d_node() {
|
||||||
polygon_2d_instance->set_polygons(polys);
|
polygon_2d_instance->set_polygons(polys);
|
||||||
|
|
||||||
EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
|
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);
|
SceneTreeDock::get_singleton()->replace_node(node, polygon_2d_instance);
|
||||||
ur->commit_action(false);
|
ur->commit_action(false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue