B2020-043: After insert of step above, resolved transition text was incorrect if tab had step number

This commit is contained in:
2020-04-02 12:58:12 +00:00
parent 9bea938777
commit bdd1b054a4
3 changed files with 21 additions and 13 deletions

View File

@@ -352,7 +352,7 @@ namespace VEPROMS.CSLA.Library
// Refresh ItemInfo to update Previous
using (Item item = Get()) ItemInfo.Refresh(item);
// Update all of the content records that have transitions that point to the Siblings or Sibling Children of the new item
tmp.UpdateTransitionText();
tmp.ResetOrdinal(); // B2020-043: Fix transition text (was updatetransitiontext)
tmp.UpdateROText();
OnNewSiblingBefore(new ItemInfoInsertEventArgs(tmp, EAddpingPart.Before));
((ItemInfo)ActiveParent).MyContent.RefreshContentParts();
@@ -2173,6 +2173,7 @@ namespace VEPROMS.CSLA.Library
public void ResetOrdinal()
{
ResetOrdinal(ItemID);
Application.DoEvents(); // B2020-043: Fix transition text
}
public static void DeleteItemInfoAndChildren(int itemID)
{
@@ -2320,10 +2321,6 @@ namespace VEPROMS.CSLA.Library
nextItem.RefreshItemParts();
//nextItem.ResetOrdinal(); - UpdateTransitionText calls ResetOrdinal
//_MyTimer.ActiveProcess = "UpdateTransitionText";
if(prevItem != null)
prevItem.UpdateTransitionText();
else
nextItem.UpdateTransitionText();
}
else if (prevItem != null)
{
@@ -2332,10 +2329,14 @@ namespace VEPROMS.CSLA.Library
//_MyTimer.ActiveProcess = "ResetOrdinal";
if (prevItem.IsCaution || prevItem.IsNote) prevItem.ResetOrdinal();
//_MyTimer.ActiveProcess = "UpdateTransitionText";
prevItem.UpdateTransitionText();
}
//_MyTimer.ActiveProcess = "DeleteItemInfoAndChildren";
ItemInfo.DeleteItemInfoAndChildren(item.ItemID); // Dispose ItemInfo and Children
if (prevItem != null)
prevItem.UpdateTransitionText();
else
nextItem.ResetOrdinal(); // B2020-043: Fix transition text, code moved from above, so that DeleteItemInfoAndChildren is called first.
}
catch (Exception ex)
{