Browse Source

Reset count to 0 when re-queueing control.

When a layout of a control exceeds the maximum passes and we re-queue it, reset the attempt count to 0 because otherwise it can end up stuck in the layout queue forever even when the next layout can succeed with e.g. 2 passes. This can happen with `ItemsRepeater`.
pull/4091/head
Steven Kirk 6 years ago
parent
commit
6dc992d04c
  1. 2
      src/Avalonia.Layout/LayoutQueue.cs

2
src/Avalonia.Layout/LayoutQueue.cs

@ -77,7 +77,7 @@ namespace Avalonia.Layout
{
if (_shouldEnqueue(item.Key))
{
_loopQueueInfo[item.Key] = new Info() { Active = true, Count = item.Value.Count + 1 };
_loopQueueInfo[item.Key] = new Info() { Active = true, Count = 0 };
_inner.Enqueue(item.Key);
}
}

Loading…
Cancel
Save