B2016-130: Copy and paste replace steps causing missing and duplicate items in tree (problems with ‘NextItems’)

This commit is contained in:
2017-08-07 13:05:02 +00:00
parent e8ae40ef7f
commit 20a07c6a3e
12 changed files with 135 additions and 31 deletions

View File

@@ -64,7 +64,17 @@ namespace VEPROMS.CSLA.Library
for (int i = 0; i < Count; i++)
{
if (base[i] == sender)
{
// Added insert to fix when item is replaced and a 'delete' is done, the item needs inserted. Note
// that when text is modified, i.e. 'Changed', this code is not executed. Fixed B2016-130.
RefreshingList = true;
IsReadOnly = false;
Items.Insert(i, (sender as ItemInfo).MyPrevious);
IsReadOnly = true;
this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i));
RefreshingList = false;
break;
}
}
}
private bool _Disposed = false;