From 4599e98341325fed331de0bee81c5f7a9c02ebc8 Mon Sep 17 00:00:00 2001 From: Tomasz Chabora Date: Fri, 24 Aug 2018 00:54:06 +0200 Subject: [PATCH] Add UndoRedo for Generate AABB (Particles) --- editor/plugins/particles_editor_plugin.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/editor/plugins/particles_editor_plugin.cpp b/editor/plugins/particles_editor_plugin.cpp index 95828064acd..00328505359 100644 --- a/editor/plugins/particles_editor_plugin.cpp +++ b/editor/plugins/particles_editor_plugin.cpp @@ -353,7 +353,11 @@ void ParticlesEditor::_generate_aabb() { node->set_emitting(false); } - node->set_visibility_aabb(rect); + UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo(); + ur->create_action(TTR("Generate Visibility AABB")); + ur->add_do_method(node, "set_visibility_aabb", rect); + ur->add_undo_method(node, "set_visibility_aabb", node->get_visibility_aabb()); + ur->commit_action(); } void ParticlesEditor::edit(Particles *p_particles) {