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;
}
private int _LastROFSTID = 0;
void frmVEPROMS_Activated(object sender, EventArgs e)
{
if (ActiveControl == tc) tc.HideCaret();
@ -953,16 +954,24 @@ namespace VEPROMS
{
DSOTabPanel myDTP = myDTI.MyDSOTabPanel;
SelectedROFst = myDTP.MyDisplayTabItem.MyItemInfo.MyDocVersion.DocVersionAssociations[0].MyROFst;
displayRO.MyROFST = SelectedROFst; // need this to update RO Tree after UpdateRofst (B2015-226)
displayRO.MyROFSTLookup = SelectedROFst.GetROFSTLookup(SelectedDVI);
displayRO.RefreshRoTree();
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.MyROFSTLookup = SelectedROFst.GetROFSTLookup(SelectedDVI);
displayRO.RefreshRoTree();
}
}
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;
displayRO.MyROFST = SelectedROFst; // need this to update RO Tree after UpdateRofst (B2015-226)
displayRO.MyROFSTLookup = SelectedROFst.GetROFSTLookup(SelectedDVI);
displayRO.RefreshRoTree();
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.MyROFSTLookup = SelectedROFst.GetROFSTLookup(SelectedDVI);
displayRO.RefreshRoTree();
}
}
}
if (SelectedStepTabPanel != null && SelectedStepTabPanel.MyStepTabRibbon != null)