B2024-016 - For Robinson, all local transitions will now have the option of including a page number. Generic, transitions defined to never include a step number will not display a list of steps in the Transitions Step Properties panel

This commit is contained in:
John Jenko 2024-03-22 09:19:59 -04:00
parent 3c632d4abc
commit c4e3ba10c6
4 changed files with 20 additions and 6 deletions

Binary file not shown.

Binary file not shown.

View File

@ -44,8 +44,9 @@ using System.Runtime.InteropServices;
// Revision DHH (day - no leading zero, two digit hour - military time
//
// ********* REMEMBER TO CHECK THE AssemblyConfiguration SETTING (ABOVE) ********
[assembly: AssemblyVersion("2.1.2403.413")]
[assembly: AssemblyFileVersion("2.1.2403.413")]
[assembly: AssemblyVersion("2.1.2403.2209")]
[assembly: AssemblyFileVersion("2.1.2403.2209")]

View File

@ -687,6 +687,8 @@ namespace Volian.Controls.Library
cbPageNum.Checked = _ModExistingPageNum = tc != null && tc.Transition_Formatted.ToUpper() == "TRUE";
}
}
// B2024-016 if transition format does not have {First Step} then don't show step list
HideStepTreeIfNeeded();
}
#endregion
#region Events
@ -916,11 +918,10 @@ namespace Volian.Controls.Library
}
else
{
_InitializingTrans = true; // just initializing now, don't set any ranges, etc.
_InitializingTrans = true; // just initializing now, don't set any ranges, etc.
tvTranFillIn((secitm.Steps == null || secitm.Steps.Count == 0) ? null : secitm.Steps[0]);
tvTran.Enabled = true;
cbIncStepNum.Enabled = true;
cbIncStepNum.Checked = true;
// B2024-016 only show the list of steps if used by the select transition
HideStepTreeIfNeeded();
// if doing a 'new' range, no node is selected in tree. Without this, the first node in the
// tree was the selected node which was throwing off the logic for defining the _RangeNode1
// and _RangeNode2
@ -935,6 +936,18 @@ namespace Volian.Controls.Library
SaveCancelEnabling();
}
}
// B2024-016 Hide the step tree when the transition definition does not include a step number {First Step}
private void HideStepTreeIfNeeded()
{
string trnFmt = _CurItemFrom.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[_TranFmtIndx].TransFormat;
bool showStepList = trnFmt.Contains("{First Step}");
if (!showStepList)
tvTran.Nodes.Clear(); // clear the tree view of steps if not needed for selected transition
tvTran.Enabled = showStepList; // show the tree view of steps?
cbIncStepNum.Enabled = showStepList; // display the Include Step checkbox?
cbIncStepNum.Checked = showStepList; // uncheck the Include Step?
}
// B2018-002 - Invalid Transitions - Declare Default Section variables
private bool NeedsDefault;
private bool HasDefault;