diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-03-04 21:54:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-04 21:54:51 +0100 |
commit | 26c1d1aec8aeb8024bcb885906fcf011dc7aac68 (patch) | |
tree | e01060e273a5a968254cf8ef29d1741885f61219 | |
parent | 9efbddfee143d5060af3b24426551c1f24a3f940 (diff) | |
parent | 4599e98341325fed331de0bee81c5f7a9c02ebc8 (diff) |
Merge pull request #26587 from KoBeWi/undo_visibility_AABB
Add UndoRedo for Generate Visibility AABB (Particles)
-rw-r--r-- | editor/plugins/particles_editor_plugin.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/editor/plugins/particles_editor_plugin.cpp b/editor/plugins/particles_editor_plugin.cpp index 95828064ac..0032850535 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) { |