mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 10:39:01 +08:00
Fix merge conflicts from master
This commit is contained in:
commit
6b0095014a
@ -778,6 +778,12 @@ class MachineManager(QObject):
|
|||||||
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.userChanges
|
||||||
|
container.setProperty(setting_name, property_name, property_value)
|
||||||
|
|
||||||
#
|
#
|
||||||
# New
|
# New
|
||||||
#
|
#
|
||||||
|
@ -518,8 +518,7 @@ Item
|
|||||||
// Update the slider value to represent the rounded value
|
// Update the slider value to represent the rounded value
|
||||||
infillSlider.value = roundedSliderValue
|
infillSlider.value = roundedSliderValue
|
||||||
|
|
||||||
// Explicitly cast to string to make sure the value passed to Python is an integer.
|
Cura.MachineManager.setSettingForAllExtruders("infill_sparse_density", "value", roundedSliderValue)
|
||||||
infillDensity.setPropertyValue("value", String(roundedSliderValue))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
style: SliderStyle
|
style: SliderStyle
|
||||||
@ -649,14 +648,20 @@ Item
|
|||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
// Set to 90% only when enabling gradual infill
|
// Set to 90% only when enabling gradual infill
|
||||||
|
var newInfillDensity;
|
||||||
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))
|
newInfillDensity = 90;
|
||||||
} else {
|
} else {
|
||||||
infillDensity.setPropertyValue("value", String(previousInfillDensity))
|
newInfillDensity = previousInfillDensity;
|
||||||
}
|
}
|
||||||
|
Cura.MachineManager.setSettingForAllExtruders("infill_sparse_density", "value", String(newInfillDensity))
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
|
Cura.MachineManager.setSettingForAllExtruders("gradual_infill_steps", "value", infill_steps_value)
|
||||||
}
|
}
|
||||||
|
|
||||||
onEntered: {
|
onEntered: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user