mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-17 03:37:48 -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()
|
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
|
// Don't set the property value from the control. It already has the same value
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (propertyProvider && text !== propertyProvider.properties.value)
|
if (propertyProvider && modified_text !== propertyProvider.properties.value)
|
||||||
{
|
{
|
||||||
updateSetting(text);
|
updateSetting(modified_text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue