summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorTomasz Chabora <kobewi4e@gmail.com>2018-08-24 00:54:06 +0200
committerTomasz Chabora <kobewi4e@gmail.com>2019-03-04 21:00:56 +0100
commit4599e98341325fed331de0bee81c5f7a9c02ebc8 (patch)
tree44443f2b9c9b2c8a5a94aab162a499fd162d479c /editor/plugins
parent53bec9deeb569cd1e3c135fb379a0bf3091f8b83 (diff)
Add UndoRedo for Generate AABB (Particles)
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/particles_editor_plugin.cpp6
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) {