Properly set SelectedDVI (Working Draft) when a Document is opened.

This commit is contained in:
Rich 2013-12-03 20:43:36 +00:00
parent 15e33d2320
commit ac725d7332

View File

@ -53,7 +53,7 @@ namespace VEPROMS
{
dlgFindReplace.Visible = false; // Find/Replace dialog should not be visable for DSO tab panels
if (tc.SelectedDisplayTabItem != null && tc.SelectedDisplayTabItem.MyItemInfo != null) // 2nd part is for unassociated libdocs
SelectedDVI = tc.SelectedDisplayTabItem.MyItemInfo.ActiveParent.ActiveParent as DocVersionInfo;
SelectedDVI = tc.SelectedDisplayTabItem.MyItemInfo.MyDocVersion;
else
SelectedDVI = null;
}
@ -66,7 +66,7 @@ namespace VEPROMS
StepPanel stepPanel = value.MyStepPanel;
ItemInfo itemInfo = stepPanel.MyProcedureItemInfo;
ProcedureInfo procedureInfo = itemInfo.MyProcedure;
SelectedDVI = procedureInfo.ActiveParent as DocVersionInfo;
SelectedDVI = procedureInfo.MyDocVersion;
// 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);
@ -1992,7 +1992,7 @@ namespace VEPROMS
}
else
{
SelectedDVI = args.MyItemInfo.ActiveParent.ActiveParent as DocVersionInfo;
SelectedDVI = args.MyItemInfo.MyDocVersion;
displayRO.ROTypeFilter = E_ROValueType.All; // allow all RO types for Word attachments (but fix)
}
}