B2022-123: RO Tab Treeview not showing correct RO values when switching between procedures.
This commit is contained in:
parent
7c9a722eba
commit
b3193e0f5a
@ -412,7 +412,6 @@ namespace VEPROMS
|
||||
tc.SeparateWindows = Properties.Settings.Default.SeparateWindows;
|
||||
tv.PauseRefresh += tv_PauseRefresh;
|
||||
tv.UnPauseRefresh += tv_UnPauseRefresh;
|
||||
|
||||
}
|
||||
|
||||
void displaySearch1_SearchComplete(object sender, DisplaySearchEventArgs args)
|
||||
@ -3913,7 +3912,8 @@ namespace VEPROMS
|
||||
}
|
||||
|
||||
// B2022-026 RO Memory reduction coding (Jakes Merge)
|
||||
displayRO.LoadTree();
|
||||
// B2022-123: RO Tab Treeview not showing correct RO values when switching between procedures. (Added True for the forceLoad parameter)
|
||||
displayRO.LoadTree(true);
|
||||
|
||||
lblUser.Text = tc.SelectedDisplayTabItem.MyUserRole;
|
||||
|
||||
|
@ -50,9 +50,7 @@ namespace Volian.Controls.Library
|
||||
//private ROFstInfo _curROFST = null;
|
||||
private int? _currRofstID = null;
|
||||
private int? _currDocVersionID = null;
|
||||
private bool _isInitializedRofstID = false;
|
||||
private bool _isInitializedDocVersionID = false;
|
||||
|
||||
|
||||
private RoUsageInfo _curROLink;
|
||||
private E_ROValueType _curROTypeFilter = E_ROValueType.All;
|
||||
|
||||
@ -108,10 +106,8 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
}
|
||||
|
||||
if (!_isInitializedRofstID && IsRofstValid)
|
||||
{
|
||||
_currRofstID = (IsRofstValid) ? (int?)_myROFST.ROFstID : null;
|
||||
}
|
||||
// B2022-123: RO Tab Treeview not showing correct RO values when switching between procedures.
|
||||
_currRofstID = (IsRofstValid) ? (int?)_myROFST.ROFstID : null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -126,10 +122,10 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
_docVersionInfo = value;
|
||||
|
||||
if (!_isInitializedDocVersionID && _docVersionInfo != null)
|
||||
{
|
||||
_currDocVersionID = (int?) _docVersionInfo.VersionID;
|
||||
}
|
||||
if (_docVersionInfo != null)
|
||||
|
||||
// B2022-123: RO Tab Treeview not showing correct RO values when switching between procedures.
|
||||
_currDocVersionID = (_docVersionInfo != null) ? (int?)_docVersionInfo.VersionID : null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -251,9 +247,6 @@ namespace Volian.Controls.Library
|
||||
_currRofstID = null;
|
||||
_currDocVersionID = null;
|
||||
|
||||
_isInitializedRofstID = false;
|
||||
_isInitializedDocVersionID = false;
|
||||
|
||||
if (_searchTimer == null)
|
||||
{
|
||||
_searchTimer = new Timer();
|
||||
@ -563,7 +556,7 @@ namespace Volian.Controls.Library
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public void LoadTree()
|
||||
public void LoadTree(bool forceReload = false)
|
||||
{
|
||||
if (MyROFST == null)
|
||||
{
|
||||
@ -572,10 +565,15 @@ namespace Volian.Controls.Library
|
||||
return;
|
||||
}
|
||||
|
||||
if(RoTreeNeedsReloaded || tvROFST.Nodes == null || tvROFST.Nodes.Count <= 0)
|
||||
if (forceReload || RoTreeNeedsReloaded || tvROFST.Nodes == null || tvROFST.Nodes.Count <= 0)
|
||||
{
|
||||
ROFSTLookup.rodbi[] dbs = MyROFSTLookup.GetRODatabaseList(true);
|
||||
|
||||
// B2022-123: RO Tab Treeview not showing correct RO values when switching between procedures.
|
||||
// Added optional parameter "forceReload" and cleared out any existing nodes before reloading the tree
|
||||
// the clear nodes code below has to be after the GetRODatabaseList database call because of races conditions in the code
|
||||
tvROFST.Nodes.Clear();
|
||||
|
||||
for (int i = 0; i < dbs.Length; i++)
|
||||
{
|
||||
ROFSTLookup.rodbi db = dbs[i];
|
||||
|
Loading…
x
Reference in New Issue
Block a user