diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-03-04 15:01:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-04 15:01:02 +0100 |
commit | e23a19248200c860acc627fb16c440cb5128a361 (patch) | |
tree | 30fb1d57a8958aebfd6b5ff4c035849f6eb906ad | |
parent | a9e48b981db6f8bc67d55cee53e28f702927a9b0 (diff) | |
parent | d2f73d4a27e32aa11e4332565d45ff838c9b36b1 (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.cpp | 5 |
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() { |