mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 22:29:01 +08:00
Update infill scroll bar if setting is changed in custom mode
CURA-4916
This commit is contained in:
parent
1eaec2ecbc
commit
e533c4604c
@ -1490,3 +1490,9 @@ class MachineManager(QObject):
|
|||||||
stacks = ExtruderManager.getInstance().getActiveExtruderStacks()
|
stacks = ExtruderManager.getInstance().getActiveExtruderStacks()
|
||||||
stacks.append(self._global_container_stack)
|
stacks.append(self._global_container_stack)
|
||||||
return [ s.containersChanged for s in stacks ]
|
return [ s.containersChanged for s in stacks ]
|
||||||
|
|
||||||
|
@pyqtSlot(str, str, str)
|
||||||
|
def setSettingForAllExtruders(self, setting_name: str, property_name: str, property_value: str):
|
||||||
|
for key, extruder in self._global_container_stack.extruders.items():
|
||||||
|
container = extruder.getContainer(0)
|
||||||
|
container.setProperty(setting_name, property_name, property_value)
|
||||||
|
@ -524,6 +524,8 @@ Item
|
|||||||
|
|
||||||
// Explicitly cast to string to make sure the value passed to Python is an integer.
|
// Explicitly cast to string to make sure the value passed to Python is an integer.
|
||||||
infillDensity.setPropertyValue("value", String(roundedSliderValue))
|
infillDensity.setPropertyValue("value", String(roundedSliderValue))
|
||||||
|
|
||||||
|
Cura.MachineManager.setSettingForAllExtruders("infill_sparse_density", "value", roundedSliderValue)
|
||||||
}
|
}
|
||||||
|
|
||||||
style: SliderStyle
|
style: SliderStyle
|
||||||
@ -656,11 +658,19 @@ Item
|
|||||||
if (parseInt(infillSteps.properties.value) == 0) {
|
if (parseInt(infillSteps.properties.value) == 0) {
|
||||||
previousInfillDensity = parseInt(infillDensity.properties.value)
|
previousInfillDensity = parseInt(infillDensity.properties.value)
|
||||||
infillDensity.setPropertyValue("value", String(90))
|
infillDensity.setPropertyValue("value", String(90))
|
||||||
|
Cura.MachineManager.setSettingForAllExtruders("infill_sparse_density", "value", String(90))
|
||||||
} else {
|
} else {
|
||||||
infillDensity.setPropertyValue("value", String(previousInfillDensity))
|
infillDensity.setPropertyValue("value", String(previousInfillDensity))
|
||||||
|
Cura.MachineManager.setSettingForAllExtruders("infill_sparse_density", "value", String(previousInfillDensity))
|
||||||
}
|
}
|
||||||
|
|
||||||
infillSteps.setPropertyValue("value", (parseInt(infillSteps.properties.value) == 0) ? 5 : 0)
|
var infill_steps_value = 0;
|
||||||
|
if (parseInt(infillSteps.properties.value) == 0)
|
||||||
|
infill_steps_value = 5;
|
||||||
|
|
||||||
|
infillSteps.setPropertyValue("value", infill_steps_value)
|
||||||
|
|
||||||
|
Cura.MachineManager.setSettingForAllExtruders("gradual_infill_steps", "value", infill_steps_value)
|
||||||
}
|
}
|
||||||
|
|
||||||
onEntered: {
|
onEntered: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user