B2016-130: Copy and paste replace steps causing missing and duplicate items in tree (problems with ‘NextItems’)
This commit is contained in:
@@ -2056,9 +2056,7 @@ namespace VEPROMS.CSLA.Library
|
||||
get
|
||||
{
|
||||
if (PrintAllAtOnce) return GetNextItem();
|
||||
if (NextItemCount > 0 && NextItems != null && NextItems.Count > 0)
|
||||
return NextItems[0];
|
||||
return null;
|
||||
return GetNext();
|
||||
}
|
||||
}
|
||||
private static void ResetOrdinal(int itemID)
|
||||
@@ -2335,16 +2333,16 @@ namespace VEPROMS.CSLA.Library
|
||||
newItemInfo.UpdateROText();
|
||||
newItemInfo.UpdatePastedStepTransitionText();
|
||||
// Add to tree
|
||||
if (newItemInfo.NextItemCount > 0)
|
||||
if (newItemInfo.NextItem != null)
|
||||
{
|
||||
using (ItemInfo itm = ItemInfo.Get(newItemInfo.NextItem.ItemID))
|
||||
using (ItemInfo itm = ItemInfo.GetNonCached(newItemInfo.NextItem.ItemID))
|
||||
{
|
||||
itm.OnNewSiblingBefore(new ItemInfoInsertEventArgs(newItemInfo, ItemInfo.EAddpingPart.Before));
|
||||
}
|
||||
}
|
||||
else if (newItemInfo.PreviousID != null)
|
||||
{
|
||||
using (ItemInfo itm2 = ItemInfo.Get((int)newItemInfo.PreviousID))
|
||||
using (ItemInfo itm2 = ItemInfo.GetNonCached((int)newItemInfo.PreviousID))
|
||||
{
|
||||
itm2.OnNewSiblingAfter(new ItemInfoInsertEventArgs(newItemInfo, ItemInfo.EAddpingPart.After));
|
||||
}
|
||||
|
Reference in New Issue
Block a user