mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-25 08:59:58 +00:00
Qt: fix setting of spinbox values when modifying shader parameter sliders
This commit is contained in:
parent
560149857b
commit
553394c266
@ -1340,31 +1340,6 @@ void MainWindow::onShaderParamSliderValueChanged(int value)
|
||||
return;
|
||||
|
||||
spinBoxVariant = slider->property("spinBox");
|
||||
|
||||
if (spinBoxVariant.isValid())
|
||||
{
|
||||
QSpinBox *spinBox = spinBoxVariant.value<QSpinBox*>();
|
||||
|
||||
if (!spinBox)
|
||||
return;
|
||||
|
||||
spinBox->blockSignals(true);
|
||||
spinBox->setValue(slider->value());
|
||||
spinBox->blockSignals(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
QVariant doubleSpinBoxVariant = slider->property("doubleSpinBox");
|
||||
QDoubleSpinBox *doubleSpinBox = doubleSpinBoxVariant.value<QDoubleSpinBox*>();
|
||||
|
||||
if (!doubleSpinBox)
|
||||
return;
|
||||
|
||||
doubleSpinBox->blockSignals(true);
|
||||
doubleSpinBox->setValue(slider->value());
|
||||
doubleSpinBox->blockSignals(false);
|
||||
}
|
||||
|
||||
paramVariant = slider->property("param");
|
||||
|
||||
if (paramVariant.isValid())
|
||||
@ -1377,6 +1352,30 @@ void MainWindow::onShaderParamSliderValueChanged(int value)
|
||||
param->current = newValue;
|
||||
}
|
||||
}
|
||||
|
||||
if (spinBoxVariant.isValid())
|
||||
{
|
||||
QSpinBox *spinBox = spinBoxVariant.value<QSpinBox*>();
|
||||
|
||||
if (!spinBox)
|
||||
return;
|
||||
|
||||
spinBox->blockSignals(true);
|
||||
spinBox->setValue(newValue);
|
||||
spinBox->blockSignals(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
QVariant doubleSpinBoxVariant = slider->property("doubleSpinBox");
|
||||
QDoubleSpinBox *doubleSpinBox = doubleSpinBoxVariant.value<QDoubleSpinBox*>();
|
||||
|
||||
if (!doubleSpinBox)
|
||||
return;
|
||||
|
||||
doubleSpinBox->blockSignals(true);
|
||||
doubleSpinBox->setValue(newValue);
|
||||
doubleSpinBox->blockSignals(false);
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::onShaderParamSpinBoxValueChanged(int value)
|
||||
|
Loading…
Reference in New Issue
Block a user