mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-10 05:48:59 +08:00
Implement allowPositive for printhead settings
CURA-6690
This commit is contained in:
parent
17a832f52f
commit
c43cdb5c63
@ -208,6 +208,7 @@ Item
|
||||
axisName: "x"
|
||||
axisMinOrMax: "min"
|
||||
allowNegativeValue: true
|
||||
allowPositiveValue: false
|
||||
|
||||
forceUpdateOnChangeFunction: forceUpdateFunction
|
||||
}
|
||||
@ -227,6 +228,7 @@ Item
|
||||
axisName: "y"
|
||||
axisMinOrMax: "min"
|
||||
allowNegativeValue: true
|
||||
allowPositiveValue: false
|
||||
|
||||
forceUpdateOnChangeFunction: forceUpdateFunction
|
||||
}
|
||||
@ -246,6 +248,7 @@ Item
|
||||
axisName: "x"
|
||||
axisMinOrMax: "max"
|
||||
allowNegativeValue: false
|
||||
allowPositiveValue: true
|
||||
|
||||
forceUpdateOnChangeFunction: forceUpdateFunction
|
||||
}
|
||||
@ -267,6 +270,7 @@ Item
|
||||
axisName: "y"
|
||||
axisMinOrMax: "max"
|
||||
allowNegativeValue: false
|
||||
allowPositiveValue: true
|
||||
|
||||
forceUpdateOnChangeFunction: forceUpdateFunction
|
||||
}
|
||||
|
@ -44,6 +44,8 @@ UM.TooltipArea
|
||||
|
||||
// whether negative value is allowed. This affects the validation of the input field.
|
||||
property bool allowNegativeValue: false
|
||||
// whether positive value is allowed. This affects the validation of the input field.
|
||||
property bool allowPositiveValue: true
|
||||
|
||||
// callback functions
|
||||
property var afterOnEditingFinishedFunction: dummy_func
|
||||
|
@ -48,9 +48,11 @@ NumericTextFieldWithUnit
|
||||
|
||||
valueValidator: DoubleValidator {
|
||||
bottom: allowNegativeValue ? Number.NEGATIVE_INFINITY : 0
|
||||
top: allowPositiveValue ? Number.POSITIVE_INFINITY : 0
|
||||
decimals: 6
|
||||
notation: DoubleValidator.StandardNotation
|
||||
}
|
||||
|
||||
valueText: axisValue
|
||||
|
||||
editingFinishedFunction: function()
|
||||
|
Loading…
x
Reference in New Issue
Block a user