mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 01:45:52 +08: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
@ -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…
x
Reference in New Issue
Block a user