summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxDGameStudios <xdgamestudios@gmail.com>2019-03-04 12:49:32 +0000
committerFrancisco Dias <Dias.FranciscoA@gmail.com>2019-03-04 12:49:32 +0000
commitd2f73d4a27e32aa11e4332565d45ff838c9b36b1 (patch)
tree4b0aa4037437f8bee9a3e44848a0fbd519c7a227
parent2bc981948d254f45a0268cfc26eb0010f00b984c (diff)
Add UndoRedo on Generate Visibility Rect (Particles2D)
-rw-r--r--editor/plugins/particles_2d_editor_plugin.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/editor/plugins/particles_2d_editor_plugin.cpp b/editor/plugins/particles_2d_editor_plugin.cpp
index bb7d50a9c1..d00687f7ea 100644
--- a/editor/plugins/particles_2d_editor_plugin.cpp
+++ b/editor/plugins/particles_2d_editor_plugin.cpp
@@ -133,7 +133,10 @@ void Particles2DEditorPlugin::_generate_visibility_rect() {
particles->set_emitting(false);
}
- particles->set_visibility_rect(rect);
+ undo_redo->create_action(TTR("Generate Visibility Rect"));
+ undo_redo->add_do_method(particles, "set_visibility_rect", rect);
+ undo_redo->add_undo_method(particles, "set_visibility_rect", particles->get_visibility_rect());
+ undo_redo->commit_action();
}
void Particles2DEditorPlugin::_generate_emission_mask() {