Browse Source

fixed bug in panel controls when they are set with the same collection instance

pull/916/head
donandren 10 years ago
committed by Andrey Kunchev
parent
commit
60ff3b8e4a
  1. 9
      src/Avalonia.Controls/Panel.cs

9
src/Avalonia.Controls/Panel.cs

@ -64,9 +64,12 @@ namespace Avalonia.Controls
{
Contract.Requires<ArgumentNullException>(value != null);
VisualChildren.Clear();
_children.Clear();
_children.AddRange(value);
if (_children != value)
{
VisualChildren.Clear();
_children.Clear();
_children.AddRange(value);
}
}
}

Loading…
Cancel
Save