[0.17.14] New checkbox style does not show checked state when first disabling the checkbox after checking it

This subforum contains all the issues which we already resolved.
Post Reply
Solinya
Long Handed Inserter
Long Handed Inserter
Posts: 79
Joined: Sun Mar 17, 2019 10:39 pm
Contact:

[0.17.14] New checkbox style does not show checked state when first disabling the checkbox after checking it

Post by Solinya »

This is a relatively minor display issue, but looks like a regression from the 0.16.51 behavior so reporting it here.

My mod has a frame that's created whenever a player clicks a specific button on the GUI or presses the appropriate key. On this frame I have some checkboxes that are enabled and unchecked. When a player checks a checkbox, I listen to the corresponding on_gui_click event and disable the checkbox to lock in their choice.

In 0.16.51:
The checkbox would show that it was disabled and checked.

In 0.17.14:
The same checkbox shows disabled but looks un-checked even though the player checked it (and the disabling triggered off the on_gui_click event that was fired).

Since I persist the checked state internally, if the player closes and reopens my frame, the checkbox will show up as disabled and checked as expected. Thus the appropriate control style is there, but maybe something isn't updating the style correctly when trying to apply both disable and checked.

Happens on both macOS 10.4.1 and Windows 10 1809. As the conditions to trigger require a mod setup, I threw together a minimal mod to showcase the problem.

To repro with the demo mod:
1. Start a new game.
2. Click the character sprite button in the top left (or press I) to bring up the demo frame.
3. Click one or more checkboxes. Once a checkbox has been checked, it will be disabled and the checkbox below enabled. Some of the checkboxes will become disabled but not display the checked state.

Note in my regular mod I was able to reproduce this 100% of the time, but in the demo case it's closer to 50%. I'm wondering if it depends on the order the checked and disabled signals are processed by the 0.17.x GUI.
Attachments
CheckboxBug_0.1.0.zip
Showcase mod with checkboxes that disable when checked
(4.11 KiB) Downloaded 108 times
factorio-current.log
Player log
(3.99 KiB) Downloaded 109 times

Rseding91
Factorio Staff
Factorio Staff
Posts: 13204
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.14] New checkbox style does not show checked state when first disabling the checkbox after checking it

Post by Rseding91 »

Thanks for the report. It's now fixed for the next version of 0.17.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”