mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 22:35:03 -06:00
Fix material update upon extruder-compatible diameter change
CURA-5834 Material models and the material container on an extruder need to be updated when the extruder's compatible diameter gets changes.
This commit is contained in:
parent
ea10d5e608
commit
97e6354c13
6 changed files with 59 additions and 20 deletions
|
@ -408,6 +408,10 @@ Cura.MachineAction
|
|||
manager.updateMaterialForDiameter(settingsTabs.currentIndex - 1);
|
||||
}
|
||||
}
|
||||
function setValueFunction(value)
|
||||
{
|
||||
Cura.MachineManager.activeStack.compatibleMaterialDiameter = value;
|
||||
}
|
||||
property bool isExtruderSetting: true
|
||||
}
|
||||
|
||||
|
@ -564,6 +568,7 @@ Cura.MachineAction
|
|||
property bool _forceUpdateOnChange: (typeof(forceUpdateOnChange) === 'undefined') ? false : forceUpdateOnChange
|
||||
property string _label: (typeof(label) === 'undefined') ? "" : label
|
||||
property string _tooltip: (typeof(tooltip) === 'undefined') ? propertyProvider.properties.description : tooltip
|
||||
property var _setValueFunction: (typeof(setValueFunction) === 'undefined') ? undefined : setValueFunction
|
||||
|
||||
UM.SettingPropertyProvider
|
||||
{
|
||||
|
@ -616,7 +621,14 @@ Cura.MachineAction
|
|||
{
|
||||
if (propertyProvider && text != propertyProvider.properties.value)
|
||||
{
|
||||
propertyProvider.setPropertyValue("value", text);
|
||||
if (_setValueFunction !== undefined)
|
||||
{
|
||||
_setValueFunction(text);
|
||||
}
|
||||
else
|
||||
{
|
||||
propertyProvider.setPropertyValue("value", text);
|
||||
}
|
||||
if(_forceUpdateOnChange)
|
||||
{
|
||||
manager.forceUpdate();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue