B2015-226: RO Information was not refreshing after an update

This commit is contained in:
2016-02-11 14:02:50 +00:00
parent cec6aa2e17
commit 4c6ac2fda0
2 changed files with 25 additions and 1 deletions

View File

@@ -568,6 +568,14 @@ namespace Volian.Controls.Library
{
if (OpenItem != null) OpenItem(sender, args);
}
// This event was added to update the Step Properties/RO & Tools/Search RO & Reports
// when an update of ro.fst is done & the ro trees on those panels needs refreshed.
// (bug fix B2015-226)
public event StepPanelTabDisplayEvent TabDisplay;
private void OnTabDisplay(object sender, StepPanelTabDisplayEventArgs args)
{
if (TabDisplay != null) TabDisplay(sender, args);
}
#endregion
#region Constructors
public vlnTreeView()
@@ -1703,7 +1711,7 @@ namespace Volian.Controls.Library
roFstInfo.ROTableUpdate += new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate);
ROFst newrofst = ROFstInfo.UpdateRoFst(roFstInfo.MyRODb, dv.DocVersionAssociations[0], dv, roFstInfo, DoProgressBarRefresh);
roFstInfo.ROTableUpdate -= new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate);
StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("DisplayROUpdateROFST");
OnTabDisplay(this, new StepPanelTabDisplayEventArgs("DisplayROUpdateROFST"));
}
MySessionInfo.CheckInItem(ownerid);
Cursor = Cursors.Default;
@@ -2016,7 +2024,15 @@ namespace Volian.Controls.Library
if ((tn.VEObject as FolderInfo) != null)
OpenProperties(tn.VEObject as FolderInfo);
else if ((tn.VEObject as DocVersionInfo) != null)
{
// see if rofst is changed, if so, need to refresh any step panel values.
int rofstid = 0;
DocVersionInfo dvi = tn.VEObject as DocVersionInfo;
if (dvi != null && dvi.DocVersionAssociations != null && dvi.DocVersionAssociations.Count > 0) rofstid = dvi.DocVersionAssociations[0].MyROFst.ROFstID;
OpenProperties(tn.VEObject as DocVersionInfo);
if (dvi != null && dvi.DocVersionAssociations != null && dvi.DocVersionAssociations.Count > 0 && rofstid != dvi.DocVersionAssociations[0].MyROFst.ROFstID)
OnTabDisplay(this,new StepPanelTabDisplayEventArgs("DisplayROUpdateROFST"));
}
else if ((tn.VEObject as ProcedureInfo) != null)
OpenProperties(tn.VEObject as ProcedureInfo);
else if ((tn.VEObject as SectionInfo) != null)