Pārlūkot izejas kodu

Don't clear ItemContainerGenerator on template change.

Can't remember why this was there but it was wrong anway - it wasn't
actually removing the items from the presenter panel. Doesn't seem to
break any unit tests so hope for the best...
Steven Kirk 9 gadi atpakaļ
vecāks
revīzija
922b0c5cd7
1 mainītis faili ar 0 papildinājumiem un 11 dzēšanām
  1. 0 11
      src/Avalonia.Controls/ItemsControl.cs

+ 0 - 11
src/Avalonia.Controls/ItemsControl.cs

@@ -287,17 +287,6 @@ namespace Avalonia.Controls
             LogicalChildren.RemoveAll(toRemove);
         }
 
-        /// <inheritdoc/>
-        protected override void OnTemplateChanged(AvaloniaPropertyChangedEventArgs e)
-        {
-            base.OnTemplateChanged(e);
-
-            if (e.NewValue == null)
-            {
-                ItemContainerGenerator?.Clear();
-            }
-        }
-
         /// <summary>
         /// Caled when the <see cref="Items"/> property changes.
         /// </summary>