This came up for us because we have a local system that cribs a lot of how EQS does its UI.
In 5.6 UEnvQueryNode::PostEditChangeProperty started clearing/setting the DataField value when you change the binding.
// If current field name is set but there are no matching names then reset the binding to the default since it's invalid.
// This could happen when copy /pasting FAIDataProviderValue based properties of different types.
else if (MatchingProperties.IsEmpty() && !NameValue.IsNone())
{
AIDataProviderValue->DataField = FName();
AIDataProviderValue->DataBinding = nullptr;
}
// If current field name is set but there are no matching names then reset the binding to the default since it's invalid.
// This could happen when copy /pasting FAIDataProviderValue based properties of different types.
else if (MatchingProperties.IsEmpty() && !NameValue.IsNone())
{
AIDataProviderValue->DataField = FName();
AIDataProviderValue->DataBinding = nullptr;
}
Specifically, if you clear the binding, it clears DataField.
FAIDataProviderValueDetails::OnBindingChanged will then validate this after the binding changes, with an identical comment, and will ensure if not set. It then seems to try to set it the same way, but with a difference (that I think is an error)
// If current field name is set but there are no matching names then reset the binding to the default since it's invalid.
// This could happen when copy /pasting FAIDataProviderValue based properties of different types.
else if (MatchingProperties.IsEmpty() && !NameValue.IsNone())
{
ensureAlwaysMsgf(false, TEXT("We expect UEnvQueryNode::PostEditChangeProperty to prevent "
"copying an incompatible provider value on top of an existing one before calling NotifyAssetUpdate and refreshing the details."));
DataBindingProperty->ResetToDefault();
DefaultValueProperty->ResetToDefault();
}
Specifically, it calls DefaultValueProperty->ResetToDefault instead of DataFieldProperty = FName() (or ResetToDefault)
This means that it doesn’t actually fix the bad data, and will keep ensuring it every time you click on it (you can set and then reset the binding yourself to fix it)
I believe it should do the same as the EQS code - clear DataField, and leave DefaultValueProperty alone.