summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-03-04 15:01:02 +0100
committerGitHub <noreply@github.com>2019-03-04 15:01:02 +0100
commite23a19248200c860acc627fb16c440cb5128a361 (patch)
tree30fb1d57a8958aebfd6b5ff4c035849f6eb906ad
parenta9e48b981db6f8bc67d55cee53e28f702927a9b0 (diff)
parentd2f73d4a27e32aa11e4332565d45ff838c9b36b1 (diff)
Merge pull request #26581 from xDGameStudios/undo_visibility_rect
Add UndoRedo for 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() {