diff options
author | Mark <mark.suurmond@gmail.com> | 2018-02-02 12:28:37 +0300 |
---|---|---|
committer | Mark <mark.suurmond@gmail.com> | 2018-02-02 12:28:37 +0300 |
commit | ee75b9bdf5aa845994a734e660f698031f814384 (patch) | |
tree | 3594db8595a5347ef5623f872e8d050972564647 /plugins/MachineSettingsAction | |
parent | 6a053a9f46c56a94cfaf611cb55376b4d0ad09d1 (diff) |
Also accept a comma as input and convert it to a dot
CURA-4910
Diffstat (limited to 'plugins/MachineSettingsAction')
-rw-r--r-- | plugins/MachineSettingsAction/MachineSettingsAction.qml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/MachineSettingsAction/MachineSettingsAction.qml b/plugins/MachineSettingsAction/MachineSettingsAction.qml index 536c6c30d6..0aad716300 100644 --- a/plugins/MachineSettingsAction/MachineSettingsAction.qml +++ b/plugins/MachineSettingsAction/MachineSettingsAction.qml @@ -591,7 +591,7 @@ Cura.MachineAction const value = propertyProvider.properties.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: { if (propertyProvider && text != propertyProvider.properties.value) @@ -826,10 +826,10 @@ Cura.MachineAction printHeadPolygon[axis][side] = result; return result; } - validator: RegExpValidator { regExp: /[0-9\.]{0,6}/ } + validator: RegExpValidator { regExp: /[0-9\.,]{0,6}/ } onEditingFinished: { - printHeadPolygon[axis][side] = parseFloat(textField.text); + printHeadPolygon[axis][side] = parseFloat(textField.text.replace(',','.')); var polygon = []; polygon.push([-printHeadPolygon["x"]["min"], printHeadPolygon["y"]["max"]]); polygon.push([-printHeadPolygon["x"]["min"],-printHeadPolygon["y"]["min"]]); |