mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-10 21:28:58 +08: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
@ -348,11 +348,13 @@ Cura.MachineAction
|
|||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
text: catalog.i18nc("@label", "Number of Extruders")
|
text: catalog.i18nc("@label", "Number of Extruders")
|
||||||
|
visible: extruderCountComboBox.visible
|
||||||
}
|
}
|
||||||
|
|
||||||
ComboBox
|
ComboBox
|
||||||
{
|
{
|
||||||
id: extruderCountComboBox
|
id: extruderCountComboBox
|
||||||
|
visible: manager.definedExtruderCount > 1
|
||||||
model: ListModel
|
model: ListModel
|
||||||
{
|
{
|
||||||
id: extruderCountModel
|
id: extruderCountModel
|
||||||
@ -364,34 +366,34 @@ Cura.MachineAction
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
currentIndex: machineExtruderCountProvider.properties.value - 1
|
currentIndex: machineExtruderCountProvider.properties.value - 1
|
||||||
onActivated:
|
onActivated:
|
||||||
{
|
{
|
||||||
machineExtruderCountProvider.setPropertyValue("value", index + 1);
|
machineExtruderCountProvider.setPropertyValue("value", index + 1);
|
||||||
manager.forceUpdate();
|
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
|
Label
|
||||||
{
|
{
|
||||||
text: catalog.i18nc("@label", "Nozzle size")
|
text: catalog.i18nc("@label", "Nozzle size")
|
||||||
visible: !Cura.MachineManager.hasVariants
|
visible: nozzleSizeField.visible
|
||||||
}
|
}
|
||||||
TextField
|
TextField
|
||||||
{
|
{
|
||||||
id: nozzleSizeField
|
id: nozzleSizeField
|
||||||
text: machineNozzleSizeProvider.properties.value
|
text: machineNozzleSizeProvider.properties.value
|
||||||
visible: !Cura.MachineManager.hasVariants
|
visible: !Cura.MachineManager.hasVariants && machineExtruderCountProvider.properties.value == 1
|
||||||
validator: RegExpValidator { regExp: /[0-9\.]{0,6}/ }
|
validator: RegExpValidator { regExp: /[0-9\.]{0,6}/ }
|
||||||
onEditingFinished: { machineNozzleSizeProvider.setPropertyValue("value", text) }
|
onEditingFinished: { machineNozzleSizeProvider.setPropertyValue("value", text) }
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
text: catalog.i18nc("@label", "mm")
|
text: catalog.i18nc("@label", "mm")
|
||||||
visible: !Cura.MachineManager.hasVariants
|
visible: nozzleSizeField.visible
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user