mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Implement allowPositive for printhead settings
CURA-6690
This commit is contained in:
parent
17a832f52f
commit
c43cdb5c63
3 changed files with 8 additions and 0 deletions
|
@ -208,6 +208,7 @@ Item
|
||||||
axisName: "x"
|
axisName: "x"
|
||||||
axisMinOrMax: "min"
|
axisMinOrMax: "min"
|
||||||
allowNegativeValue: true
|
allowNegativeValue: true
|
||||||
|
allowPositiveValue: false
|
||||||
|
|
||||||
forceUpdateOnChangeFunction: forceUpdateFunction
|
forceUpdateOnChangeFunction: forceUpdateFunction
|
||||||
}
|
}
|
||||||
|
@ -227,6 +228,7 @@ Item
|
||||||
axisName: "y"
|
axisName: "y"
|
||||||
axisMinOrMax: "min"
|
axisMinOrMax: "min"
|
||||||
allowNegativeValue: true
|
allowNegativeValue: true
|
||||||
|
allowPositiveValue: false
|
||||||
|
|
||||||
forceUpdateOnChangeFunction: forceUpdateFunction
|
forceUpdateOnChangeFunction: forceUpdateFunction
|
||||||
}
|
}
|
||||||
|
@ -246,6 +248,7 @@ Item
|
||||||
axisName: "x"
|
axisName: "x"
|
||||||
axisMinOrMax: "max"
|
axisMinOrMax: "max"
|
||||||
allowNegativeValue: false
|
allowNegativeValue: false
|
||||||
|
allowPositiveValue: true
|
||||||
|
|
||||||
forceUpdateOnChangeFunction: forceUpdateFunction
|
forceUpdateOnChangeFunction: forceUpdateFunction
|
||||||
}
|
}
|
||||||
|
@ -267,6 +270,7 @@ Item
|
||||||
axisName: "y"
|
axisName: "y"
|
||||||
axisMinOrMax: "max"
|
axisMinOrMax: "max"
|
||||||
allowNegativeValue: false
|
allowNegativeValue: false
|
||||||
|
allowPositiveValue: true
|
||||||
|
|
||||||
forceUpdateOnChangeFunction: forceUpdateFunction
|
forceUpdateOnChangeFunction: forceUpdateFunction
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,6 +44,8 @@ UM.TooltipArea
|
||||||
|
|
||||||
// whether negative value is allowed. This affects the validation of the input field.
|
// whether negative value is allowed. This affects the validation of the input field.
|
||||||
property bool allowNegativeValue: false
|
property bool allowNegativeValue: false
|
||||||
|
// whether positive value is allowed. This affects the validation of the input field.
|
||||||
|
property bool allowPositiveValue: true
|
||||||
|
|
||||||
// callback functions
|
// callback functions
|
||||||
property var afterOnEditingFinishedFunction: dummy_func
|
property var afterOnEditingFinishedFunction: dummy_func
|
||||||
|
|
|
@ -48,9 +48,11 @@ NumericTextFieldWithUnit
|
||||||
|
|
||||||
valueValidator: DoubleValidator {
|
valueValidator: DoubleValidator {
|
||||||
bottom: allowNegativeValue ? Number.NEGATIVE_INFINITY : 0
|
bottom: allowNegativeValue ? Number.NEGATIVE_INFINITY : 0
|
||||||
|
top: allowPositiveValue ? Number.POSITIVE_INFINITY : 0
|
||||||
decimals: 6
|
decimals: 6
|
||||||
notation: DoubleValidator.StandardNotation
|
notation: DoubleValidator.StandardNotation
|
||||||
}
|
}
|
||||||
|
|
||||||
valueText: axisValue
|
valueText: axisValue
|
||||||
|
|
||||||
editingFinishedFunction: function()
|
editingFinishedFunction: function()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue