Merge pull request #26581 from xDGameStudios/undo_visibility_rect

Add UndoRedo for Generate Visibility Rect (Particles2D)
This commit is contained in:
Rémi Verschelde 2019-03-04 15:01:02 +01:00 committed by GitHub
commit e23a192482
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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() {