mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-19 17:49:14 +00:00
UI: Fix disabled sliders
Previously sliders would not be disabled when the the obs_property was disabled.
This commit is contained in:
parent
aa713e07d0
commit
bf4ad780b5
|
@ -329,8 +329,7 @@ void OBSPropertiesView::AddInt(obs_property_t *prop, QFormLayout *layout,
|
|||
int val = (int)obs_data_get_int(settings, name);
|
||||
QSpinBox *spin = new SpinBoxIgnoreScroll();
|
||||
|
||||
if (!obs_property_enabled(prop))
|
||||
spin->setEnabled(false);
|
||||
spin->setEnabled(obs_property_enabled(prop));
|
||||
|
||||
int minVal = obs_property_int_min(prop);
|
||||
int maxVal = obs_property_int_max(prop);
|
||||
|
@ -354,6 +353,7 @@ void OBSPropertiesView::AddInt(obs_property_t *prop, QFormLayout *layout,
|
|||
slider->setPageStep(stepVal);
|
||||
slider->setValue(val);
|
||||
slider->setOrientation(Qt::Horizontal);
|
||||
slider->setEnabled(obs_property_enabled(prop));
|
||||
subLayout->addWidget(slider);
|
||||
|
||||
connect(slider, SIGNAL(valueChanged(int)), spin,
|
||||
|
|
Loading…
Reference in a new issue