Debug - Split a line into multiple lines to determine the cause of an error.
Debug - Added logic so that focus is not given to an object that is being disposed.
This commit is contained in:
@@ -57,7 +57,14 @@ namespace VEPROMS
|
||||
}
|
||||
else // Step Tab Panel
|
||||
{
|
||||
SelectedDVI = value.MyStepPanel.MyProcedureItemInfo.MyProcedure.ActiveParent as DocVersionInfo;
|
||||
// The following line was broken into separate lines because a NullReferenceError was occuring.
|
||||
// Now we should be able to tell what is wrong by which line causes the Null Reference Error
|
||||
// RHM 20101217
|
||||
//SelectedDVI = value.MyStepPanel.MyProcedureItemInfo.MyProcedure.ActiveParent as DocVersionInfo;
|
||||
StepPanel stepPanel = value.MyStepPanel;
|
||||
ItemInfo itemInfo = stepPanel.MyProcedureItemInfo;
|
||||
ProcedureInfo procedureInfo = itemInfo.MyProcedure;
|
||||
SelectedDVI = procedureInfo.ActiveParent as DocVersionInfo;
|
||||
// Remove it first, if it wasn't set, this doesn't do anything, but if it was set, you don't want
|
||||
// multiple events because the print dialog will be displayed for each time the event was added.
|
||||
_SelectedStepTabPanel.MyStepTabRibbon.PrintRequest -= new StepTabRibbonEvent(MyStepTabRibbon_PrintRequest);
|
||||
|
Reference in New Issue
Block a user