Browse Source

Raise correct inheritance value change.

When raising `PropertyChanged` due to setting the inheritance parent, use the closest value in the inheritance tree rather than the furthest.
pull/8600/head
Steven Kirk 4 years ago
parent
commit
a1830b79b5
  1. 7
      src/Avalonia.Base/PropertyStore/ValueStore.cs

7
src/Avalonia.Base/PropertyStore/ValueStore.cs

@ -313,9 +313,14 @@ namespace Avalonia.PropertyStore
continue;
if (values.TryGetValue(key, out var existing))
values[key] = existing.WithNewValue(value);
{
if (existing.NewValue is null)
values[key] = existing.WithNewValue(value);
}
else
{
values.Add(key, new(null, value));
}
}
f = f.InheritanceAncestor;

Loading…
Cancel
Save