B2022-142 the insert RO tree now refreshes when going between regular steps, RO Table steps, and RO Figure steps.

B2022-135 – improved logic to ensure we are using the Doc Version associated with the current step text.
This commit is contained in:
John Jenko 2022-12-02 19:45:11 +00:00
parent 928fe33d7f
commit 3f4ca2ac23

View File

@ -79,7 +79,11 @@ namespace Volian.Controls.Library
public bool RoTreeNeedsReloaded
{
get { return (MyROFST != null && _currRofstID != null && MyROFST.ROFstID != (int)_currRofstID) || (MyDvi != null && _currDocVersionID != null && MyDvi.VersionID != (int)_currDocVersionID); }
get { return (MyROFST != null && _currRofstID != null && MyROFST.ROFstID != (int)_currRofstID) ||
(MyDvi != null && _currDocVersionID != null && MyDvi.VersionID != (int)_currDocVersionID) ||
// B2022-142 check if we went from a RO Table or RO Figure step type to a regular step type
// or if we went from a regular step type to a RO Table or RO Figure step type
(_myRTB != null && (_myRTB.IsRoTable != lastRTBwasROTable || _myRTB.IsRoFigure != lastRTBwasROFigure)); }
}
public ROFstInfo MyROFST
@ -114,21 +118,25 @@ namespace Volian.Controls.Library
public DocVersionInfo MyDvi
{
get { return _docVersionInfo; }
// B2022-135 Submitted for Admin Tools (Check RO Links tool)
get { return (_myRTB != null) ? _myRTB.MyDVI : _docVersionInfo; }
set
{
// Check if DocVersion Has Changed
if (_docVersionInfo != value)
// B2022-135 Submitted for Admin Tools (Check RO Links tool)
if (_docVersionInfo == null || _docVersionInfo != value || _docVersionInfo.VersionID != value.VersionID)
{
_docVersionInfo = value;
if (_docVersionInfo != null)
if (_myRTB != null && (_docVersionInfo == null || _docVersionInfo.VersionID != _myRTB.MyDVI.VersionID))
{
_docVersionInfo = _myRTB.MyDVI;
}
}
// B2022-123: RO Tab Treeview not showing correct RO values when switching between procedures.
_currDocVersionID = (_docVersionInfo != null) ? (int?)_docVersionInfo.VersionID : null;
}
}
}
public ROFSTLookup MyROFSTLookup
{
@ -172,6 +180,10 @@ namespace Volian.Controls.Library
}
}
// B2022-142 added this local variables to keep flag if the last step type was a RO Table or a RO Figure
// this is used to determin if we need to re-load the RO tree
private bool lastRTBwasROTable = false;
private bool lastRTBwasROFigure = false;
public StepRTB MyRTB
{
get { return _myRTB; }
@ -189,6 +201,11 @@ namespace Volian.Controls.Library
}
else if(_myRTB != value)
{
if (_myRTB != null)
{
lastRTBwasROTable = _myRTB.IsRoTable; // B2022-141 save whether last RTB was a RO Table
lastRTBwasROFigure = _myRTB.IsRoFigure; // B2022-141 save whether last RTB was a RO Figure
}
_myRTB = value;
MyRTB.LinkChanged += new StepRTBLinkEvent(MyRTB_LinkChanged);