diff --git a/source/carla_shared.py b/source/carla_shared.py index 48a6498b4..b9614b7e5 100644 --- a/source/carla_shared.py +++ b/source/carla_shared.py @@ -933,6 +933,8 @@ class PluginParameter(QWidget): self.ui.widget.setScalePoints(pInfo['scalePoints'], bool(pHints & PARAMETER_USES_SCALEPOINTS)) if not pHints & PARAMETER_IS_ENABLED: + self.ui.label.setEnabled(False) + self.ui.widget.setEnabled(False) self.ui.widget.setReadOnly(True) self.ui.sb_control.setEnabled(False) self.ui.sb_channel.setEnabled(False) diff --git a/source/widgets/paramspinbox.py b/source/widgets/paramspinbox.py index 13a01e302..7816a35cf 100644 --- a/source/widgets/paramspinbox.py +++ b/source/widgets/paramspinbox.py @@ -268,6 +268,10 @@ class ParamSpinBox(QAbstractSpinBox): self.fReadOnly = yesNo QAbstractSpinBox.setReadOnly(self, yesNo) + def setEnabled(self, yesNo): + self.fBar.setEnabled(yesNo) + QAbstractSpinBox.setEnabled(self, yesNo) + def setScalePoints(self, scalePoints, useScalePoints): if len(scalePoints) == 0: self.fScalePoints = None