Merge pull request #26587 from KoBeWi/undo_visibility_AABB

Add UndoRedo for Generate Visibility AABB (Particles)
This commit is contained in:
Rémi Verschelde 2019-03-04 21:54:51 +01:00 committed by GitHub
commit 26c1d1aec8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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