0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 04:42:18 +02:00

UI: Fix settings window data always being "changed"

Fixes a bug introduced in 6407707a04 where if you open the settings
window the settings would always think there were new changes.  It was
marking a control as changed when it shouldn't be
This commit is contained in:
jp9000 2016-01-31 15:32:43 -08:00
parent d7880e0ae8
commit fddb7d283d

View File

@ -919,14 +919,18 @@ void OBSBasicSettings::ResetDownscales(uint32_t cx, uint32_t cy)
float baseAspect = float(cx) / float(cy);
float outputAspect = float(out_cx) / float(out_cy);
if (close_float(baseAspect, outputAspect, 0.01f))
bool closeAspect = close_float(baseAspect, outputAspect, 0.01f);
if (closeAspect)
ui->outputResolution->lineEdit()->setText(oldOutputRes);
else
ui->outputResolution->lineEdit()->setText(bestScale.c_str());
ui->outputResolution->blockSignals(false);
ui->outputResolution->setProperty("changed", QVariant(true));
videoChanged = true;
if (!closeAspect) {
ui->outputResolution->setProperty("changed", QVariant(true));
videoChanged = true;
}
if (advRescale.isEmpty())
advRescale = res.c_str();