Handle nulls for selected values

This commit is contained in:
Rich 2009-03-28 22:16:58 +00:00
parent 612b043186
commit c09a44a14f

View File

@ -41,7 +41,12 @@ namespace VEPROMS
{ {
_SelectedStepTabPanel = value; _SelectedStepTabPanel = value;
if (value == null) // DSO Tab Panel if (value == null) // DSO Tab Panel
{
if (tc.SelectedDisplayTabItem != null)
SelectedDVI = tc.SelectedDisplayTabItem.MyItemInfo.MyActiveParent.ActiveParent as DocVersionInfo; SelectedDVI = tc.SelectedDisplayTabItem.MyItemInfo.MyActiveParent.ActiveParent as DocVersionInfo;
else
SelectedDVI = null;
}
else // Step Tab Panel else // Step Tab Panel
SelectedDVI = value.MyStepPanel.MyProcedureItemInfo.MyProcedure.MyActiveParent as DocVersionInfo; SelectedDVI = value.MyStepPanel.MyProcedureItemInfo.MyProcedure.MyActiveParent as DocVersionInfo;
} }
@ -918,6 +923,7 @@ namespace VEPROMS
displayTags.MyRTB = args.MyStepItem.MyStepRTB; displayTags.MyRTB = args.MyStepItem.MyStepRTB;
displayRO.ProgressBar = bottomProgBar; displayRO.ProgressBar = bottomProgBar;
} }
if(tc.SelectedDisplayTabItem != null)
SelectedStepTabPanel = ((DisplayTabItem)tc.SelectedDisplayTabItem).MyStepTabPanel; SelectedStepTabPanel = ((DisplayTabItem)tc.SelectedDisplayTabItem).MyStepTabPanel;
} }
ctrlAnnotationDetails.UpdateAnnotationGrid(_CurrentItem); ctrlAnnotationDetails.UpdateAnnotationGrid(_CurrentItem);
@ -1181,6 +1187,8 @@ namespace VEPROMS
} }
private void InitiateSearch(bool searchFocus) private void InitiateSearch(bool searchFocus)
{
if (toolsPanel.Expanded)
{ {
if (displaySearch1.Mydocversion == null)//!displaySearch1.OpenDocFromSearch) if (displaySearch1.Mydocversion == null)//!displaySearch1.OpenDocFromSearch)
{ {
@ -1192,6 +1200,7 @@ namespace VEPROMS
displaySearch1.advTreeProcSetsFillIn(searchFocus); displaySearch1.advTreeProcSetsFillIn(searchFocus);
} }
} }
}
private void toolsPanel_ExpandedChanged(object sender, ExpandedChangeEventArgs e) private void toolsPanel_ExpandedChanged(object sender, ExpandedChangeEventArgs e)
{ {