This commit is contained in:
parent
18743629c6
commit
eecafd42db
@ -2298,7 +2298,22 @@ namespace VEPROMS.CSLA.Library
|
||||
// if not metasection/tietabtolevel, return the 'section number'. (where the '.' may or may not exist)
|
||||
if (!ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.TieTabToLevel)
|
||||
{
|
||||
int indx = ActiveSection.MyTab.CleanText.IndexOf(".");
|
||||
// If the Section's 'tab' is a character or has a character preceding the '.' is an alpha character,
|
||||
// just return the alpha (no '.')
|
||||
// If the character preceding the '. 'is a number, return the section tab up to and including the '.'
|
||||
// Otherwise, just return the section tab.
|
||||
// Before checking for anything, if the DisplayNumber starts with 'ATTACHMENT ', don't use that in the Section
|
||||
// prefix for the tabstring.
|
||||
string attNum = ActiveSection.DisplayNumber.ToUpper().StartsWith("ATTACHMENT ") ? ActiveSection.DisplayNumber.Substring(11) : ActiveSection.DisplayNumber;
|
||||
Match m = Regex.Match(attNum, @"[a-zA-Z]"); // for alpha, use non-touched displaynumber
|
||||
int indx = -1;
|
||||
if (m.Success)
|
||||
{
|
||||
indx = attNum.IndexOf(".");
|
||||
if (indx < 0) return attNum;
|
||||
return attNum.Substring(0, indx);
|
||||
}
|
||||
indx = ActiveSection.MyTab.CleanText.IndexOf(".");
|
||||
if (indx > 0) return ActiveSection.MyTab.CleanText.Substring(0, indx + 1); // include the '.'
|
||||
return ActiveSection.MyTab.CleanText.TrimEnd();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user