1
Vote

Bug in views_CollectionChanged

description

private void views_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
    {
        // Add or remove from view container?
        if (e.Action == NotifyCollectionChangedAction.Add)
        {
            AddViews(e.NewItems);
        }
        else if (e.Action == NotifyCollectionChangedAction.Remove)
        {
            RemoveViews(e.NewItems);
        }
        // TODO: Link or unlink the items collection.
    }
 
 
! RemoveViews(e.NewItems);
must be RemoveViews(e.OldItems);

comments