Merge pull request 'B2024-019 - BNPP - Allow the use to select a sub-step that has a bullet instead of a number/letter step tab, when using the {Step Text} transitions. Also don’t show any Tables in the tree view to select the step to link to.' (#286) from B2024-019_BNPP_StepTextTransition into Development
Reviewed-on: #286
This commit is contained in:
commit
3f94097f73
@ -199,9 +199,12 @@ namespace VEPROMS.CSLA.Library
|
||||
LoadChildren(true);
|
||||
}
|
||||
private bool _allParts = true;
|
||||
public virtual void LoadChildren(bool allParts)
|
||||
private bool _excludeTablesFigsEqu = false; // used for inserting Step Text transitions (BNPP)
|
||||
public virtual void LoadChildren(bool allParts, bool excldTablesFigEq = false)
|
||||
{
|
||||
_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();
|
||||
@ -262,6 +265,10 @@ 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)
|
||||
@ -279,7 +286,8 @@ namespace VEPROMS.CSLA.Library
|
||||
tmp._ChildrenLoaded = true;// Reset the children loaded flag
|
||||
if (lastWasSection)
|
||||
this.Nodes.Insert(0, tmp);
|
||||
else
|
||||
// B2024-019 don't show Tables, Figures, or Equations in step tree when inserting Text Transitions
|
||||
else if (!_excludeTablesFigsEqu || !isTableFigEqu)
|
||||
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);
|
||||
|
@ -901,7 +901,8 @@ 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);
|
||||
tn.LoadChildren(loadAllChildren);
|
||||
bool excludeTableFigEqu = loadAllChildren; // don't show Tables, Figures, or Equations in step list
|
||||
tn.LoadChildren(loadAllChildren, excludeTableFigEqu);
|
||||
}
|
||||
private void cbTranSects_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
@ -1341,7 +1342,13 @@ namespace Volian.Controls.Library
|
||||
return;
|
||||
}
|
||||
// B2015-170 - don't allow a transition to step that is not sequential
|
||||
if ((toItem != null &&!toItem.IsNumbered) || (rangeItem != null && !rangeItem.IsNumbered))
|
||||
// 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))
|
||||
{
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user