Fixed a null reference error that happened when a step was deleted from the tree. B2016-105

Adding a new step from the section node in a tree will now consistently add the new step at the beginning of that section – whether the procedure editor is open or not. – B2016-002
This commit is contained in:
2016-04-21 17:31:33 +00:00
parent 77d0446631
commit ca12e39a6b
2 changed files with 10 additions and 3 deletions

View File

@@ -1016,7 +1016,8 @@ namespace VEPROMS
if (displayHistory.MyEditItem != null && displayHistory.MyItemInfo.MyProcedure.ItemID == args.MyItemInfo.ItemID)
displayHistory.MyEditItem = null;
// bug fix B2016-005 - set MyCopyStep to null. This will take the paste options off of the tree node context menus. jsj 4-19-2016
if (args.MyItemInfo.ItemID == tc.MyCopyStep.ItemID)
// B2016-105 - added null reference check -jsj
if (tc.MyCopyStep != null && args.MyItemInfo.ItemID == tc.MyCopyStep.ItemID)
tc.MyCopyStep = null;
bool rtval = tc.DeleteRTBItem(args.MyItemInfo);
// Also disable the paste options on the ribbon if it is open. jsj 4-19-2016