Closed Nancy-Salpepi closed 1 year ago
This also happens with the Alleles panel.
When in the State wrapper, if I press the Set State Now button a second time, the checkboxes will become unchecked.
A little confusing because the steps describe the Intro screen, but checkboxes2.mp4 shows the Lab screen, and does not show all of the steps. But reproduced in https://phet-dev.colorado.edu/html/natural-selection/1.5.0-dev.1/phet-io/wrappers/studio/ and master.
This problem is also present in the previous version, https://phet-dev.colorado.edu/html/natural-selection/1.4.3/phet-io/wrappers/studio/. So it's probably an ordering dependency in how state is restored. I'm guessing that the state of the Properties associated with the checkboxes is restored first. Then state related to the fur mutation is restored, and it sets the state of Properties associated with the checkboxes to true -- and that bit probably needs to be surround with an "if not setting state" check.
The problem reported in the Alleles panel is almost certainly the same issue.
Btw... When pressing the "Set State Now" button a second time, the allele is already in the correct state, so its listener does not fire, and does not change the state of the Properties associated with the checkboxes. The checkboxes therefore end up in the correct state.
Fixed in the above commit by checking
if ( !phet.joist.sim.isSettingPhetioStateProperty.value )
where appropriate.
@Nancy-Salpepi please verify in master. If it looks OK, change the label to status:fixed-awaiting-deploy
and unassigned.
Looks good on master. Sorry for the confusion with the original video.
To verify in https://github.com/phetsims/qa/issues/967, follow the steps in https://github.com/phetsims/natural-selection/issues/314#issue-1301221663.
Please close this issue if it verifies OK.
This looks good in 1.5.0-dev.5. Closing.
Test device MacBook Air m1 chip
Operating System macOS 12.4
Browser Safari
Problem description For https://github.com/phetsims/qa/issues/818, after selecting mutations, any checkboxes I then uncheck in the Population panel will be checked in the launched sim. The only exceptions are the Total checkbox and Data Probe checkbox. This happens on both screens and can be seen in both Studio and State wrappers.
This is also seen in version 1.4.3
Steps to reproduce
Visuals
https://user-images.githubusercontent.com/87318828/178357428-40cfe7b6-f4e9-4e54-9c8c-e11aab3dd03b.mp4