You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #917 (comment) we discovered that the fuseRepairButton.visibleProperty was read-only and we wanted to make it writable. @matthew-blackman made the change, but it revealed the reason why it was probably read-only in the first place.
The model sets fuseRepairButton.visibleProperty every time a fuse is selected/deselected. Setting the visibleProperty to false will only hide button until the next time a fuse is selected (assuming isRepairableProperty: true).
The same is also true of batteryReverseButton.visibleProperty. Each time a battery with isReversibleProperty: true is selected, the model will set visibleProperty: true.
Interestingly, trashButton.visibleProperty does not exhibit this same behavior. If a client hides the trash button, it stays hidden. For consistency and convenience, it would be nice if we could do the same with fuseRepairButton.visibleProperty and batteryReverseButton.visibleProperty.
Clients could technically use isRepairableProperty and isReversibleProperty to hide these buttons, but doing it for every single fuse and battery that students create is a real drag. It would be simpler to have global control over the button's visibility.
The text was updated successfully, but these errors were encountered:
In #917 (comment) we discovered that the
fuseRepairButton.visibleProperty
was read-only and we wanted to make it writable. @matthew-blackman made the change, but it revealed the reason why it was probably read-only in the first place.The model sets
fuseRepairButton.visibleProperty
every time a fuse is selected/deselected. Setting thevisibleProperty
to false will only hide button until the next time a fuse is selected (assumingisRepairableProperty: true
).The same is also true of
batteryReverseButton.visibleProperty
. Each time a battery withisReversibleProperty: true
is selected, the model will setvisibleProperty: true
.Interestingly,
trashButton.visibleProperty
does not exhibit this same behavior. If a client hides the trash button, it stays hidden. For consistency and convenience, it would be nice if we could do the same withfuseRepairButton.visibleProperty
andbatteryReverseButton.visibleProperty
.Clients could technically use
isRepairableProperty
andisReversibleProperty
to hide these buttons, but doing it for every single fuse and battery that students create is a real drag. It would be simpler to have global control over the button's visibility.The text was updated successfully, but these errors were encountered: