From fddb7d283df226416417c3d82cbf28638bd66f22 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Sun, 31 Jan 2016 15:32:43 -0800 Subject: [PATCH] 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 --- obs/window-basic-settings.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/obs/window-basic-settings.cpp b/obs/window-basic-settings.cpp index 3efa5e1bc..b80306a0a 100644 --- a/obs/window-basic-settings.cpp +++ b/obs/window-basic-settings.cpp @@ -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();