mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 11:17:49 -06:00
Fix updating value with "," instead of "." in reccomended mode
Fixed by correctly parsing dot in `SingleSettingTextField`. CURA-9793
This commit is contained in:
parent
8117087664
commit
564fefa1c7
1 changed files with 6 additions and 4 deletions
|
@ -87,15 +87,17 @@ UM.TextField
|
|||
|
||||
function parseValueUpdateSetting()
|
||||
{
|
||||
if (propertyProvider.properties.value === text || (parseFloat(propertyProvider.properties.value) === parseFloat(text)))
|
||||
// User convenience. We use dots for decimal values
|
||||
const modified_text = text.replace(",", ".");
|
||||
if (propertyProvider.properties.value === modified_text || (parseFloat(propertyProvider.properties.value) === parseFloat(modified_text)))
|
||||
{
|
||||
// Don't set the property value from the control. It already has the same value
|
||||
return
|
||||
}
|
||||
|
||||
if (propertyProvider && text !== propertyProvider.properties.value)
|
||||
if (propertyProvider && modified_text !== propertyProvider.properties.value)
|
||||
{
|
||||
updateSetting(text);
|
||||
updateSetting(modified_text);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -138,7 +140,7 @@ UM.TextField
|
|||
color: UM.Theme.getColor("setting_validation_warning_background")
|
||||
}
|
||||
},
|
||||
State
|
||||
State
|
||||
{
|
||||
name: "disabled"
|
||||
when: !control.enabled
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue