Don't stage a value if it's already the current value

This commit is contained in:
Dan Paulat 2022-12-20 23:39:37 -06:00
parent 289b7620a9
commit 3109344ad5

View file

@ -129,8 +129,15 @@ bool SettingsVariable<T>::StageValue(const T& value)
if (Validate(value)) if (Validate(value))
{ {
p->staged_ = value; if (p->value_ != value)
validated = true; {
p->staged_ = value;
}
else
{
p->staged_.reset();
}
validated = true;
} }
return validated; return validated;