Compare commits

..

No commits in common. "3f94097f73204e6be93b370c1c965978b0db97b1" and "09b5cb4be40e8077a59ec3630773cb33d2b87172" have entirely different histories.

2 changed files with 4 additions and 19 deletions

View File

@ -199,12 +199,9 @@ namespace VEPROMS.CSLA.Library
LoadChildren(true);
}
private bool _allParts = true;
private bool _excludeTablesFigsEqu = false; // used for inserting Step Text transitions (BNPP)
public virtual void LoadChildren(bool allParts, bool excldTablesFigEq = false)
public virtual void LoadChildren(bool allParts)
{
_allParts = allParts;
// B2024-019 don't show Tables, Figures, or Equations in step tree when inserting Text Transitions
_excludeTablesFigsEqu = excldTablesFigEq;
if (!_ChildrenLoaded)
{
this.Nodes.Clear();
@ -265,10 +262,6 @@ namespace VEPROMS.CSLA.Library
if (!skipIt)
{
VETreeNode tmp = new VETreeNode(o, _allParts);
// B2024-019 don't show Tables, Figures, or Equations in step tree when inserting Text Transitions
bool isTableFigEqu = tmp.Text.Equals("Table") ||
tmp.Text.Equals("Figure") ||
tmp.Text.Equals("Equation");
if (o.HasChildren)
{
if (o is PartInfo)
@ -286,8 +279,7 @@ namespace VEPROMS.CSLA.Library
tmp._ChildrenLoaded = true;// Reset the children loaded flag
if (lastWasSection)
this.Nodes.Insert(0, tmp);
// B2024-019 don't show Tables, Figures, or Equations in step tree when inserting Text Transitions
else if (!_excludeTablesFigsEqu || !isTableFigEqu)
else
this.Nodes.Add(tmp);
// if last thing was section & this is step, do insert - i.e. so that steps go before sections.
lastWasSection = (o is PartInfo && (o as PartInfo).PartType == E_FromType.Section);

View File

@ -901,8 +901,7 @@ namespace Volian.Controls.Library
// F2024-047 BNPP standard Text transition - pass True to LoadChildren to load all children.
E_TransUI etm = (E_TransUI) _CurItemFrom.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[_TranFmtIndx].TransUI;
bool loadAllChildren = ((etm & E_TransUI.StepAllChildren) == E_TransUI.StepAllChildren);
bool excludeTableFigEqu = loadAllChildren; // don't show Tables, Figures, or Equations in step list
tn.LoadChildren(loadAllChildren, excludeTableFigEqu);
tn.LoadChildren(loadAllChildren);
}
private void cbTranSects_SelectedIndexChanged(object sender, EventArgs e)
{
@ -1342,13 +1341,7 @@ namespace Volian.Controls.Library
return;
}
// B2015-170 - don't allow a transition to step that is not sequential
// B2024-019 - but allow if TranFmt only contains {Step Text}
// - Calvert uses {Step Text} but also includes step number
// - Barakah (BNPP) uses just {Step Text} to link to standard text
bool onlyStepText = false;
if (listBoxTranFmt.Text.Contains("{Step Text}") && !listBoxTranFmt.Text.Contains("{First Step}"))
onlyStepText = true;
if (!onlyStepText && (toItem != null &&!toItem.IsNumbered) || (rangeItem != null && !rangeItem.IsNumbered))
if ((toItem != null &&!toItem.IsNumbered) || (rangeItem != null && !rangeItem.IsNumbered))
{
FlexibleMessageBox.Show("For transitions containing step references, the transition must be to a numbered or lettered step.",
"Cannot add transition to a non-sequential step", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);