Closed Luisav1 closed 2 years ago
@chrisklus and I fixed this in the above commit. We move the code that was clearing out the particles to the undo decay button listener so it's all done together.
For QA: Please close if this is fixed, and reach out to me or @Luisav1 if any clarification is needed. Thanks!
This looks good to me in 1.0.0-rc.10 (tested with He-10 and Fr-197 and compared with 1.0.0-rc.8).
@chrisklus and I saw that when more than one decay happens that changes the mass number (alpha decay, neutron emission, or proton emission), any outgoing particles are cleared out. This behavior is only expected when the undo decay button is pressed.
This is happening because whenever anything in the atom changes, we are assuming that the user is doing that change. So we hide the undo decay button. The problem is that when we hide the undo decay button, we give it the same behavior as if the undo decay button was clicked - clearing out any outgoing particles.
@ariel-phet We ran into this issue but we think we have a solution.