Switch to an appropriate material when changing the material diameter

If we don't do this, the material will always override the setting in Machine Settings
This commit is contained in:
fieldOfView 2017-07-09 16:41:24 +02:00
parent ddc94e9bec
commit 8c2f556616
2 changed files with 90 additions and 1 deletions

View file

@ -320,7 +320,8 @@ Cura.MachineAction
sourceComponent: numericTextFieldWithUnit
property string settingKey: "material_diameter"
property string unit: catalog.i18nc("@label", "mm")
property string tooltip: catalog.i18nc("@tooltip", "The nominal diameter of filament supported by the printer.")
property string tooltip: catalog.i18nc("@tooltip", "The nominal diameter of filament supported by the printer. The exact diameter will be overridden by the material and/or the profile.")
property string afterOnEditingFinished: "manager.updateMaterialForDiameter()"
}
Label
{
@ -578,6 +579,7 @@ Cura.MachineAction
property bool _isExtruderSetting: (typeof(isExtruderSetting) === 'undefined') ? false: isExtruderSetting
property bool _allowNegative: (typeof(allowNegative) === 'undefined') ? false : allowNegative
property string _afterOnEditingFinished: (typeof(afterOnEditingFinished) === 'undefined') ? "": afterOnEditingFinished
property bool _forceUpdateOnChange: (typeof(forceUpdateOnChange) === 'undefined') ? false: forceUpdateOnChange
property string _tooltip: (typeof(tooltip) === 'undefined') ? propertyProvider.properties.description : tooltip
@ -620,6 +622,10 @@ Cura.MachineAction
ExtruderManager.setActiveExtruderIndex(extruderIndex)
}
}
if(_afterOnEditingFinished != "")
{
eval(_afterOnEditingFinished);
}
}
}
}