Extract validation/item handling of AssetPicker in a separate class.

This commit is contained in:
MineBill
2023-10-31 16:32:57 +02:00
parent f434ff2efe
commit df5dc0c284
11 changed files with 367 additions and 298 deletions

View File

@@ -38,13 +38,13 @@ namespace FlaxEditor.Surface.Elements
private void OnNodeValuesChanged()
{
SelectedID = (Guid)ParentNode.Values[Archetype.ValueIndex];
Validator.SelectedID = (Guid)ParentNode.Values[Archetype.ValueIndex];
}
/// <inheritdoc />
protected override void OnSelectedItemChanged()
{
var selectedId = SelectedID;
var selectedId = Validator.SelectedID;
if (ParentNode != null && (Guid)ParentNode.Values[Archetype.ValueIndex] != selectedId)
{
ParentNode.SetValue(Archetype.ValueIndex, selectedId);