mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 12:39:03 +08:00
Also accept a comma as input and convert it to a dot
CURA-4910
This commit is contained in:
parent
6a053a9f46
commit
ee75b9bdf5
@ -591,7 +591,7 @@ Cura.MachineAction
|
|||||||
const value = propertyProvider.properties.value;
|
const value = propertyProvider.properties.value;
|
||||||
return value ? value : "";
|
return value ? value : "";
|
||||||
}
|
}
|
||||||
validator: RegExpValidator { regExp: _allowNegative ? /-?[0-9\.]{0,6}/ : /[0-9\.]{0,6}/ }
|
validator: RegExpValidator { regExp: _allowNegative ? /-?[0-9\.,]{0,6}/ : /[0-9\.,]{0,6}/ }
|
||||||
onEditingFinished:
|
onEditingFinished:
|
||||||
{
|
{
|
||||||
if (propertyProvider && text != propertyProvider.properties.value)
|
if (propertyProvider && text != propertyProvider.properties.value)
|
||||||
@ -826,10 +826,10 @@ Cura.MachineAction
|
|||||||
printHeadPolygon[axis][side] = result;
|
printHeadPolygon[axis][side] = result;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
validator: RegExpValidator { regExp: /[0-9\.]{0,6}/ }
|
validator: RegExpValidator { regExp: /[0-9\.,]{0,6}/ }
|
||||||
onEditingFinished:
|
onEditingFinished:
|
||||||
{
|
{
|
||||||
printHeadPolygon[axis][side] = parseFloat(textField.text);
|
printHeadPolygon[axis][side] = parseFloat(textField.text.replace(',','.'));
|
||||||
var polygon = [];
|
var polygon = [];
|
||||||
polygon.push([-printHeadPolygon["x"]["min"], printHeadPolygon["y"]["max"]]);
|
polygon.push([-printHeadPolygon["x"]["min"], printHeadPolygon["y"]["max"]]);
|
||||||
polygon.push([-printHeadPolygon["x"]["min"],-printHeadPolygon["y"]["min"]]);
|
polygon.push([-printHeadPolygon["x"]["min"],-printHeadPolygon["y"]["min"]]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user