summaryrefslogtreecommitdiffstats
path: root/editor/plugins/gpu_particles_3d_editor_plugin.cpp
diff options
context:
space:
mode:
authorajreckof <66184050+ajreckof@users.noreply.github.com>2023-06-16 02:33:33 +0200
committerajreckof <66184050+ajreckof@users.noreply.github.com>2023-08-03 18:38:24 +0200
commit4da9927faf35660d004c5ff346ef401a14c69ae3 (patch)
tree518c5c0a52dae28736638d088973cc77175a083b /editor/plugins/gpu_particles_3d_editor_plugin.cpp
parentc0d8d91b15597209a1ca865c6ff4f84f06f7de86 (diff)
downloadredot-engine-4da9927faf35660d004c5ff346ef401a14c69ae3.tar.gz
Fix replace node deleting `Node` properties.
Update editor/scene_tree_dock.cpp Co-Authored-By: Hugo Locurcio <hugo.locurcio@hugo.pro>
Diffstat (limited to 'editor/plugins/gpu_particles_3d_editor_plugin.cpp')
-rw-r--r--editor/plugins/gpu_particles_3d_editor_plugin.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/editor/plugins/gpu_particles_3d_editor_plugin.cpp b/editor/plugins/gpu_particles_3d_editor_plugin.cpp
index 65f66c2661..265eb8b1e4 100644
--- a/editor/plugins/gpu_particles_3d_editor_plugin.cpp
+++ b/editor/plugins/gpu_particles_3d_editor_plugin.cpp
@@ -276,11 +276,8 @@ void GPUParticles3DEditor::_menu_option(int p_option) {
EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Convert to CPUParticles3D"));
- ur->add_do_method(SceneTreeDock::get_singleton(), "replace_node", node, cpu_particles, true, false);
- ur->add_do_reference(cpu_particles);
- ur->add_undo_method(SceneTreeDock::get_singleton(), "replace_node", cpu_particles, node, false, false);
- ur->add_undo_reference(node);
- ur->commit_action();
+ SceneTreeDock::get_singleton()->replace_node(node, cpu_particles);
+ ur->commit_action(false);
} break;
case MENU_OPTION_RESTART: {