Add a field to set the material diameter for the printer

This is used to filter the list of available materials, see https://github.com/Ultimaker/Cura/pull/1685
This commit is contained in:
fieldOfView 2017-04-30 11:08:24 +02:00
parent 57f936e5ff
commit c9039bb6fc

View File

@ -382,6 +382,18 @@ Cura.MachineAction
}
}
Label
{
text: catalog.i18nc("@label", "Material Diameter")
}
Loader
{
id: materialDiameterField
sourceComponent: numericTextFieldWithUnit
property var propertyProvider: materialDiameterProvider
property string unit: catalog.i18nc("@label", "mm")
property bool forceUpdateOnChange: false
}
Label
{
text: catalog.i18nc("@label", "Nozzle size")
@ -753,6 +765,16 @@ Cura.MachineAction
storeIndex: manager.containerIndex
}
UM.SettingPropertyProvider
{
id: materialDiameterProvider
containerStackId: Cura.MachineManager.activeMachineId
key: "material_diameter"
watchedProperties: [ "value" ]
storeIndex: manager.containerIndex
}
UM.SettingPropertyProvider
{
id: machineNozzleSizeProvider