mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 22:13:58 -06:00
Merge branch 'fix_machinesettings_negative_offsets' of https://github.com/fieldOfView/Cura into fieldOfView-fix_machinesettings_negative_offsets
This commit is contained in:
commit
937207a0eb
1 changed files with 8 additions and 6 deletions
|
@ -341,7 +341,6 @@ Cura.MachineAction
|
|||
sourceComponent: numericTextFieldWithUnit
|
||||
property var propertyProvider: gantryHeightProvider
|
||||
property string unit: catalog.i18nc("@label", "mm")
|
||||
property bool forceUpdateOnChange: false
|
||||
}
|
||||
|
||||
Item { width: UM.Theme.getSize("default_margin").width; height: UM.Theme.getSize("default_margin").height }
|
||||
|
@ -385,7 +384,6 @@ Cura.MachineAction
|
|||
sourceComponent: numericTextFieldWithUnit
|
||||
property var propertyProvider: materialDiameterProvider
|
||||
property string unit: catalog.i18nc("@label", "mm")
|
||||
property bool forceUpdateOnChange: false
|
||||
}
|
||||
Label
|
||||
{
|
||||
|
@ -399,7 +397,6 @@ Cura.MachineAction
|
|||
sourceComponent: numericTextFieldWithUnit
|
||||
property var propertyProvider: machineNozzleSizeProvider
|
||||
property string unit: catalog.i18nc("@label", "mm")
|
||||
property bool forceUpdateOnChange: false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -550,7 +547,6 @@ Cura.MachineAction
|
|||
sourceComponent: numericTextFieldWithUnit
|
||||
property var propertyProvider: extruderNozzleSizeProvider
|
||||
property string unit: catalog.i18nc("@label", "mm")
|
||||
property bool forceUpdateOnChange: false
|
||||
}
|
||||
|
||||
Label
|
||||
|
@ -564,6 +560,7 @@ Cura.MachineAction
|
|||
property var propertyProvider: extruderOffsetXProvider
|
||||
property string unit: catalog.i18nc("@label", "mm")
|
||||
property bool forceUpdateOnChange: true
|
||||
property bool allowNegative: true
|
||||
}
|
||||
Label
|
||||
{
|
||||
|
@ -576,6 +573,7 @@ Cura.MachineAction
|
|||
property var propertyProvider: extruderOffsetYProvider
|
||||
property string unit: catalog.i18nc("@label", "mm")
|
||||
property bool forceUpdateOnChange: true
|
||||
property bool allowNegative: true
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -655,17 +653,21 @@ Cura.MachineAction
|
|||
Item {
|
||||
height: textField.height
|
||||
width: textField.width
|
||||
|
||||
property bool _allowNegative: (typeof(allowNegative) === 'undefined') ? false : allowNegative
|
||||
property bool _forceUpdateOnChange: (typeof(forceUpdateOnChange) === 'undefined') ? false: forceUpdateOnChange
|
||||
|
||||
TextField
|
||||
{
|
||||
id: textField
|
||||
text: (propertyProvider.properties.value) ? propertyProvider.properties.value : ""
|
||||
validator: RegExpValidator { regExp: /[0-9\.]{0,6}/ }
|
||||
validator: RegExpValidator { regExp: _allowNegative ? /-?[0-9\.]{0,6}/ : /[0-9\.]{0,6}/ }
|
||||
onEditingFinished:
|
||||
{
|
||||
if (propertyProvider && text != propertyProvider.properties.value)
|
||||
{
|
||||
propertyProvider.setPropertyValue("value", text);
|
||||
if(forceUpdateOnChange)
|
||||
if(_forceUpdateOnChange)
|
||||
{
|
||||
var extruderIndex = ExtruderManager.activeExtruderIndex;
|
||||
manager.forceUpdate();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue