mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Add control to set the number of extruders in Machine Settings
This commit is contained in:
parent
0c74b4d108
commit
e853d87779
2 changed files with 53 additions and 5 deletions
|
|
@ -345,6 +345,35 @@ Cura.MachineAction
|
|||
Item { width: UM.Theme.getSize("default_margin").width; height: UM.Theme.getSize("default_margin").height }
|
||||
Item { width: UM.Theme.getSize("default_margin").width; height: UM.Theme.getSize("default_margin").height }
|
||||
|
||||
Label
|
||||
{
|
||||
text: catalog.i18nc("@label", "Number of Extruders")
|
||||
}
|
||||
|
||||
ComboBox
|
||||
{
|
||||
id: extruderCountComboBox
|
||||
model: ListModel
|
||||
{
|
||||
id: extruderCountModel
|
||||
Component.onCompleted:
|
||||
{
|
||||
for(var i = 0; i < manager.definedExtruderCount; i++)
|
||||
{
|
||||
extruderCountModel.append({text: String(i + 1), value: i});
|
||||
}
|
||||
}
|
||||
}
|
||||
currentIndex: machineExtruderCountProvider.properties.value - 1
|
||||
onActivated:
|
||||
{
|
||||
machineExtruderCountProvider.setPropertyValue("value", index + 1);
|
||||
manager.forceUpdate();
|
||||
}
|
||||
}
|
||||
Item { width: UM.Theme.getSize("default_margin").width; height: UM.Theme.getSize("default_margin").height }
|
||||
|
||||
|
||||
Label
|
||||
{
|
||||
text: catalog.i18nc("@label", "Nozzle size")
|
||||
|
|
@ -532,6 +561,16 @@ Cura.MachineAction
|
|||
storeIndex: manager.containerIndex
|
||||
}
|
||||
|
||||
UM.SettingPropertyProvider
|
||||
{
|
||||
id: machineExtruderCountProvider
|
||||
|
||||
containerStackId: Cura.MachineManager.activeMachineId
|
||||
key: "machine_extruder_count"
|
||||
watchedProperties: [ "value" ]
|
||||
storeIndex: manager.containerIndex
|
||||
}
|
||||
|
||||
UM.SettingPropertyProvider
|
||||
{
|
||||
id: gantryHeightProvider
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue