Fix infill to 0% on upgrade to Cura 5.0.

This is a weird one, fortunately Jaime had the idea that it had to do with a spurious update to the visual element of the slider.

CURA-9127
This commit is contained in:
Remco Burema 2022-04-21 11:55:42 +02:00
parent c002a52b50
commit 8afb06f7ae

View file

@ -172,7 +172,8 @@ Item
// same operation
const active_mode = UM.Preferences.getValue("cura/active_mode")
if (active_mode == 0 || active_mode == "simple")
if (visible // Workaround: 'visible' is checked because on startup in Windows it spuriously gets an 'onValueChanged' with value '0' if this isn't checked.
&& (active_mode == 0 || active_mode == "simple"))
{
Cura.MachineManager.setSettingForAllExtruders("infill_sparse_density", "value", roundedSliderValue)
Cura.MachineManager.resetSettingForAllExtruders("infill_line_distance")