Don't allow editing read only params

This commit is contained in:
Michael Zanetti 2020-04-09 12:55:32 +02:00
parent 8a256d9bbb
commit 681dd19475
2 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ public:
ReadOnlyRole
};
explicit ParamTypes(QObject *parent = 0);
explicit ParamTypes(QObject *parent = nullptr);
QList<ParamType *> paramTypes();

View File

@ -181,7 +181,6 @@ Page {
Component {
id: discoveryParamsPage
Page {
id: discoveryParamsView
ColumnLayout {
@ -385,6 +384,7 @@ Page {
delegate: ParamDelegate {
// Layout.preferredHeight: 60
Layout.fillWidth: true
enabled: !model.readOnly
paramType: root.deviceClass.paramTypes.get(index)
value: d.deviceDescriptor && d.deviceDescriptor.params.getParam(paramType.id) ?
d.deviceDescriptor.params.getParam(paramType.id).value :