C2020-043: Do not remove delimiters for tabs in search reports

This commit is contained in:
Kathy Ruffing 2020-10-14 13:24:26 +00:00
parent a0b6b8a8ce
commit 683ff2d304

View File

@ -949,9 +949,16 @@ namespace Volian.Print.Library
string hlsTab = stpinfo.MyTab.CleanTextNoSymbols; //StepInfo.Get(pitem.ItemID).MyTab.CleanTextNoSymbols;
string typeName = stpinfo.FormatStepData.StepEditData.TypeMenu.MenuItem;//stpinfo.FormatStepData.GetPDDisplayName(); //.ToString();
// C2020-043: don't remove delimiters on tabs if this step's tab has the parent tab included.
bool hasParent = false;
if (IncludesParentToHLS(stpinfo) && !hlsTab.Contains("\u25CF"))
{
hlsTab = hlsTab.Trim(" ".ToCharArray()).TrimEnd(".".ToCharArray());
hasParent = true;
}
if (hlsTab == null || hlsTab == "")
hlsTab = "{" + typeName + " " + pitem.Ordinal.ToString() + "}.";
else if (!sret.StartsWith(hlsTab.Trim(" ".ToCharArray())))
else if (!hasParent && !sret.StartsWith(hlsTab.Trim(" ".ToCharArray())))
{
foreach (string rmvDelim in DelimList) hlsTab = hlsTab.Replace(rmvDelim, "");
hlsTab = hlsTab.Trim(" ".ToCharArray());