This project is read-only.


UndoRedoList<T>.Clear() does not clear the list if a change has already been recorded for the list


If there are changes already recorded for an UndoRedoList<T> then when calling Clear(), it doesn't actually clear the list. It appears the item is already Enlisted in the currentCommand changes such that when you call Enlist(false), it skips the section where a new list is instantiated thereby clearing the list.
A workaround is to cast the UndoRedoList<T> to an IList. The IList.Clear() is implemented correctly.
Closed Jul 15, 2011 at 6:18 AM by SergeiArhipenko
Released in v1.0


sha0skywalker wrote May 2, 2008 at 4:11 PM

I believe the fix is just to add a list.Clear() after the Enlist call in the UndoRedoList<T>.Clear() call

SergeiArhipenko wrote Jun 6, 2008 at 10:51 AM

will put in beta 1

wrote Jun 6, 2008 at 10:51 AM

wrote Jun 6, 2008 at 6:24 PM

wrote Jul 15, 2011 at 6:18 AM

wrote Feb 13, 2013 at 11:58 PM

wrote May 16, 2013 at 5:53 AM