B2017-240 Only refresh the RO Menu Tree when the ROFST is changed

This commit is contained in:
Rich 2017-10-20 15:45:37 +00:00
parent 5a086f955b
commit 7645633143

View File

@ -936,6 +936,7 @@ namespace VEPROMS
{ {
tmrTreeView.Enabled = true; tmrTreeView.Enabled = true;
} }
private int _LastROFSTID = 0;
void frmVEPROMS_Activated(object sender, EventArgs e) void frmVEPROMS_Activated(object sender, EventArgs e)
{ {
if (ActiveControl == tc) tc.HideCaret(); if (ActiveControl == tc) tc.HideCaret();
@ -953,18 +954,26 @@ namespace VEPROMS
{ {
DSOTabPanel myDTP = myDTI.MyDSOTabPanel; DSOTabPanel myDTP = myDTI.MyDSOTabPanel;
SelectedROFst = myDTP.MyDisplayTabItem.MyItemInfo.MyDocVersion.DocVersionAssociations[0].MyROFst; SelectedROFst = myDTP.MyDisplayTabItem.MyItemInfo.MyDocVersion.DocVersionAssociations[0].MyROFst;
if (_LastROFSTID != SelectedROFst.ROFstID) // B2017-240 Only refresh when the ROFSTID is different
{
_LastROFSTID = SelectedROFst.ROFstID;
displayRO.MyROFST = SelectedROFst; // need this to update RO Tree after UpdateRofst (B2015-226) displayRO.MyROFST = SelectedROFst; // need this to update RO Tree after UpdateRofst (B2015-226)
displayRO.MyROFSTLookup = SelectedROFst.GetROFSTLookup(SelectedDVI); displayRO.MyROFSTLookup = SelectedROFst.GetROFSTLookup(SelectedDVI);
displayRO.RefreshRoTree(); displayRO.RefreshRoTree();
} }
}
else if (tc.MyEditItem != null && displayRO.MyROFST != null && tc.MyEditItem.MyItemInfo.MyDocVersion.DocVersionAssociations[0].ROFstID != displayRO.MyROFST.ROFstID) else if (tc.MyEditItem != null && displayRO.MyROFST != null && tc.MyEditItem.MyItemInfo.MyDocVersion.DocVersionAssociations[0].ROFstID != displayRO.MyROFST.ROFstID)
{ {
SelectedROFst = tc.MyEditItem.MyItemInfo.MyDocVersion.DocVersionAssociations[0].MyROFst; SelectedROFst = tc.MyEditItem.MyItemInfo.MyDocVersion.DocVersionAssociations[0].MyROFst;
if (_LastROFSTID != SelectedROFst.ROFstID)// B2017-240 Only refresh when the ROFSTID is different
{
_LastROFSTID = SelectedROFst.ROFstID;
displayRO.MyROFST = SelectedROFst; // need this to update RO Tree after UpdateRofst (B2015-226) displayRO.MyROFST = SelectedROFst; // need this to update RO Tree after UpdateRofst (B2015-226)
displayRO.MyROFSTLookup = SelectedROFst.GetROFSTLookup(SelectedDVI); displayRO.MyROFSTLookup = SelectedROFst.GetROFSTLookup(SelectedDVI);
displayRO.RefreshRoTree(); displayRO.RefreshRoTree();
} }
} }
}
if (SelectedStepTabPanel != null && SelectedStepTabPanel.MyStepTabRibbon != null) if (SelectedStepTabPanel != null && SelectedStepTabPanel.MyStepTabRibbon != null)
SelectedStepTabPanel.MyStepTabRibbon.SetUpdRoValBtn(SelectedStepTabPanel.MyStepTabRibbon.NewerRoFst()); SelectedStepTabPanel.MyStepTabRibbon.SetUpdRoValBtn(SelectedStepTabPanel.MyStepTabRibbon.NewerRoFst());
} }