mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 22:35:03 -06:00
SpinBox fixed for values above the max value
Review comments Fixes CURA-10096
This commit is contained in:
parent
fe5893feb6
commit
1ebde31397
1 changed files with 3 additions and 3 deletions
|
@ -62,7 +62,7 @@ Item
|
|||
valueFromText: function(text)
|
||||
{
|
||||
|
||||
var value = parseFloat(text.substring(prefix.length, text.length - suffix.length).replace(",", ".")) / base.stepSize ;
|
||||
var value = parseFloat(text.substring(prefix.length, text.length - suffix.length).replace(",", ".")) / base.stepSize;
|
||||
if (Number.isNaN(value))
|
||||
{
|
||||
value = from
|
||||
|
@ -113,8 +113,8 @@ Item
|
|||
|
||||
onTextChanged:
|
||||
{
|
||||
var value = spinBox.valueFromText(spinBoxText.text);
|
||||
spinBoxText.text = spinBox.textFromValue(value);
|
||||
var value = spinBox.valueFromText(text);
|
||||
text = spinBox.textFromValue(value);
|
||||
spinBox.value = value;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue