mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 06:23:59 -06:00
Hide nozzlesize field for multiextrusion printers...
and hide extruder count combobox when no extruders are defined
This commit is contained in:
parent
e853d87779
commit
a41bc77e5a
1 changed files with 8 additions and 6 deletions
|
@ -348,11 +348,13 @@ Cura.MachineAction
|
|||
Label
|
||||
{
|
||||
text: catalog.i18nc("@label", "Number of Extruders")
|
||||
visible: extruderCountComboBox.visible
|
||||
}
|
||||
|
||||
ComboBox
|
||||
{
|
||||
id: extruderCountComboBox
|
||||
visible: manager.definedExtruderCount > 1
|
||||
model: ListModel
|
||||
{
|
||||
id: extruderCountModel
|
||||
|
@ -364,34 +366,34 @@ Cura.MachineAction
|
|||
}
|
||||
}
|
||||
}
|
||||
currentIndex: machineExtruderCountProvider.properties.value - 1
|
||||
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 }
|
||||
Item { width: UM.Theme.getSize("default_margin").width; height: UM.Theme.getSize("default_margin").height; visible: extruderCountComboBox.visible }
|
||||
|
||||
|
||||
Label
|
||||
{
|
||||
text: catalog.i18nc("@label", "Nozzle size")
|
||||
visible: !Cura.MachineManager.hasVariants
|
||||
visible: nozzleSizeField.visible
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: nozzleSizeField
|
||||
text: machineNozzleSizeProvider.properties.value
|
||||
visible: !Cura.MachineManager.hasVariants
|
||||
visible: !Cura.MachineManager.hasVariants && machineExtruderCountProvider.properties.value == 1
|
||||
validator: RegExpValidator { regExp: /[0-9\.]{0,6}/ }
|
||||
onEditingFinished: { machineNozzleSizeProvider.setPropertyValue("value", text) }
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: catalog.i18nc("@label", "mm")
|
||||
visible: !Cura.MachineManager.hasVariants
|
||||
}
|
||||
visible: nozzleSizeField.visible
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue