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

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