mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Fix value-units can now change visually/immediately on printer switch.
CURA-12443
This commit is contained in:
parent
1198746870
commit
cf419c3025
2 changed files with 13 additions and 1 deletions
|
@ -92,6 +92,8 @@ SettingItem
|
||||||
|
|
||||||
UM.Label
|
UM.Label
|
||||||
{
|
{
|
||||||
|
id: unitlabel
|
||||||
|
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
left: parent.left
|
left: parent.left
|
||||||
|
@ -106,6 +108,16 @@ SettingItem
|
||||||
horizontalAlignment: (input.effectiveHorizontalAlignment == Text.AlignLeft) ? Text.AlignRight : Text.AlignLeft
|
horizontalAlignment: (input.effectiveHorizontalAlignment == Text.AlignLeft) ? Text.AlignRight : Text.AlignLeft
|
||||||
textFormat: Text.PlainText
|
textFormat: Text.PlainText
|
||||||
color: UM.Theme.getColor("setting_unit")
|
color: UM.Theme.getColor("setting_unit")
|
||||||
|
|
||||||
|
Binding
|
||||||
|
{
|
||||||
|
target: unitlabel
|
||||||
|
property: "text"
|
||||||
|
value:
|
||||||
|
{
|
||||||
|
return propertyProvider.properties.unit;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TextInput
|
TextInput
|
||||||
|
|
|
@ -321,7 +321,7 @@ Item
|
||||||
|
|
||||||
containerStackId: contents.activeMachineId
|
containerStackId: contents.activeMachineId
|
||||||
key: model.key
|
key: model.key
|
||||||
watchedProperties: [ "value", "enabled", "state", "validationState", "settable_per_extruder", "resolve" ]
|
watchedProperties: [ "value", "enabled", "state", "validationState", "settable_per_extruder", "resolve", "unit" ]
|
||||||
storeIndex: 0
|
storeIndex: 0
|
||||||
removeUnusedValue: model.resolve === undefined
|
removeUnusedValue: model.resolve === undefined
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue