Browse Source

Stop DevTools crashing when tree changed.

PerspexReadOnlyListView had some problems...
pull/58/head
Steven Kirk 11 years ago
parent
commit
6de240cc4d
  1. 8
      Perspex.Base/Collections/PerspexReadOnlyListView.cs

8
Perspex.Base/Collections/PerspexReadOnlyListView.cs

@ -115,14 +115,14 @@ namespace Perspex.Collections
case NotifyCollectionChangedAction.Add:
ev = new NotifyCollectionChangedEventArgs(
NotifyCollectionChangedAction.Add,
e.NewItems,
e.NewItems.Cast<object>().ToList(),
e.NewStartingIndex);
break;
case NotifyCollectionChangedAction.Remove:
ev = new NotifyCollectionChangedEventArgs(
NotifyCollectionChangedAction.Remove,
e.OldItems,
e.NewStartingIndex);
e.OldStartingIndex);
break;
case NotifyCollectionChangedAction.Replace:
ev = new NotifyCollectionChangedEventArgs(
@ -248,7 +248,7 @@ namespace Perspex.Collections
return this.GetEnumerator();
}
private IList<TOut> ConvertList(IEnumerable list)
private IList ConvertList(IEnumerable list)
{
return list.Cast<TIn>().Select(this.convert).ToList();
}
@ -271,7 +271,7 @@ namespace Perspex.Collections
ev = new NotifyCollectionChangedEventArgs(
NotifyCollectionChangedAction.Remove,
this.ConvertList(e.OldItems),
e.NewStartingIndex);
e.OldStartingIndex);
break;
case NotifyCollectionChangedAction.Replace:
ev = new NotifyCollectionChangedEventArgs(

Loading…
Cancel
Save