B2016-130: Copy and paste replace steps causing missing and duplicate items in tree (problems with ‘NextItems’)
This commit is contained in:
@@ -254,9 +254,7 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
using (Item fromitem = previousInfo == null ? null : previousInfo.Get())
|
||||
{
|
||||
ItemInfo nextInfo = null; // Check to see if the item is being inserted in the middle of some items.
|
||||
if (previousInfo != null && previousInfo.NextItems != null && previousInfo.NextItems.Count > 0)
|
||||
nextInfo = previousInfo.NextItems[0];
|
||||
ItemInfo nextInfo = previousInfo.GetNext(); // Check to see if the item is being inserted in the middle of some items.
|
||||
using (Item itm = Item.MakeItem(fromitem, cont))
|
||||
{
|
||||
newitemid = itm.ItemID;
|
||||
@@ -1986,8 +1984,13 @@ namespace VEPROMS.CSLA.Library
|
||||
get
|
||||
{
|
||||
ItemInfo temp = this;
|
||||
while (temp.NextItems != null && temp.NextItems.Count > 0) temp = temp.NextItems[0];
|
||||
return temp;
|
||||
ItemInfo last = this;
|
||||
while (temp != null)
|
||||
{
|
||||
last = temp;
|
||||
temp = temp.GetNext();
|
||||
}
|
||||
return last;
|
||||
}
|
||||
}
|
||||
public ItemInfo LastChild(E_FromType partType)
|
||||
|
Reference in New Issue
Block a user