|
|
|
@ -787,30 +787,28 @@ namespace Avalonia.PropertyStore |
|
|
|
{ |
|
|
|
var frame = _frames[i]; |
|
|
|
var priority = frame.Priority; |
|
|
|
var foundEntry = frame.TryGetEntryIfActive(property, out var entry, out var activeChanged); |
|
|
|
|
|
|
|
// If the active state of the frame has changed since the last read, and
|
|
|
|
// the frame holds multiple values then we need to re-evaluate the
|
|
|
|
// effective values of all properties.
|
|
|
|
if (activeChanged && frame.EntryCount > 1) |
|
|
|
{ |
|
|
|
ReevaluateEffectiveValues(); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (frame.TryGetEntryIfActive(property, out var entry, out var activeChanged)) |
|
|
|
if (foundEntry && entry!.HasValue) |
|
|
|
{ |
|
|
|
// If The active state of the frame has changed since the last read, and
|
|
|
|
// the frame holds multiple values then we need to re-evaluate the
|
|
|
|
// effective values of all properties.
|
|
|
|
if (activeChanged && frame.EntryCount > 1) |
|
|
|
if (current is not null) |
|
|
|
{ |
|
|
|
ReevaluateEffectiveValues(); |
|
|
|
return; |
|
|
|
current.SetAndRaise(this, entry, priority); |
|
|
|
} |
|
|
|
|
|
|
|
if (entry.HasValue) |
|
|
|
else |
|
|
|
{ |
|
|
|
if (current is not null) |
|
|
|
{ |
|
|
|
current.SetAndRaise(this, entry, priority); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
current = property.CreateEffectiveValue(Owner); |
|
|
|
AddEffectiveValue(property, current); |
|
|
|
current.SetAndRaise(this, entry, priority); |
|
|
|
} |
|
|
|
current = property.CreateEffectiveValue(Owner); |
|
|
|
AddEffectiveValue(property, current); |
|
|
|
current.SetAndRaise(this, entry, priority); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|