Skip to content
Snippets Groups Projects
Commit a1249727 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Merge branch 'xenhat-misc-fixes' into 'master'

Fixed: Resetting unchanged settings values trigger changed event anyway

See merge request alchemy/alchemy-next!27
parents a52cbaea 6ccb3f16
Branches
Tags
1 merge request!27Fixed: Resetting unchanged settings values trigger changed event anyway
......@@ -315,7 +315,10 @@ void LLControlVariable::resetToDefault(bool fire_signal)
mValues.pop_back();
}
if(fire_signal)
// don't fire if the value didn't actually change
LLSD previous_value = getComparableValue(getValue());
bool value_changed = (llsd_compare(originalValue, previous_value) == FALSE);
if(fire_signal && value_changed)
{
firePropertyChanged(originalValue);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment