Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfieldOfView <aldo@fieldofview.com>2022-05-06 14:11:49 +0300
committerfieldOfView <aldo@fieldofview.com>2022-05-06 14:11:49 +0300
commit8aa08944f23682e8bec9dc74e534e51d3f9441f1 (patch)
tree9b487115fef2a971f81eef16c914ada83f4fefb8 /resources/qml
parenteae5f4d57a1bff2b0c3135b5b76265f823891c83 (diff)
Disable "Print Settings" fields for read-only materials
Diffstat (limited to 'resources/qml')
-rw-r--r--resources/qml/MachineSettings/NumericTextFieldWithUnit.qml1
-rw-r--r--resources/qml/Preferences/Materials/MaterialsView.qml1
2 files changed, 2 insertions, 0 deletions
diff --git a/resources/qml/MachineSettings/NumericTextFieldWithUnit.qml b/resources/qml/MachineSettings/NumericTextFieldWithUnit.qml
index b5147d63db..75fe56c8e7 100644
--- a/resources/qml/MachineSettings/NumericTextFieldWithUnit.qml
+++ b/resources/qml/MachineSettings/NumericTextFieldWithUnit.qml
@@ -38,6 +38,7 @@ UM.TooltipArea
property alias textField: textFieldWithUnit
property alias valueText: textFieldWithUnit.text
+ property alias enabled: textFieldWithUnit.enabled
property alias editingFinishedFunction: textFieldWithUnit.editingFinishedFunction
property string tooltipText: propertyProvider.properties.description ? propertyProvider.properties.description : ""
diff --git a/resources/qml/Preferences/Materials/MaterialsView.qml b/resources/qml/Preferences/Materials/MaterialsView.qml
index a172949812..16a2b1b7de 100644
--- a/resources/qml/Preferences/Materials/MaterialsView.qml
+++ b/resources/qml/Preferences/Materials/MaterialsView.qml
@@ -601,6 +601,7 @@ Item
maximum: 99999
unitText: model.unit
decimals: model.unit == "mm" ? 2 : 0
+ enabled: base.editingEnabled
editingFinishedFunction: materialPropertyProvider.setPropertyValue("value", value)
}