B2013-076: Fixed a few bugs in resolving transitions text (sometimes leaving off ‘(‘ or ‘)’)

This commit is contained in:
2013-04-05 11:24:53 +00:00
parent 89dd2f72b0
commit 69b14e912c
3 changed files with 17 additions and 4 deletions

View File

@@ -405,9 +405,14 @@ namespace VEPROMS.CSLA.Library
{
_Results.Append(Prefix);
_Prefix = null;
}
// If the prefix contains an open paren, we want to add the open paren regardless
// of whether there already is text in the resulting string.
else if (!HasText && Prefix != null && Prefix.Contains("("))
{
_Results.Append(Prefix.TrimStart(" ".ToCharArray())); // since no text in result, trim starting space.
}
}
}
public string OverridePrefix
{
@@ -541,7 +546,7 @@ namespace VEPROMS.CSLA.Library
prevToken = token;
if (startIndex >= tb._TransFormat.Length) break;
}
if (startIndex < tb._TransFormat.Length) tb.Append(tb._TransFormat.Substring(startIndex, tb._TransFormat.Length - startIndex - 1));
if ((startIndex < tb._TransFormat.Length) && lastAdded) tb.Append(tb._TransFormat.Substring(startIndex, tb._TransFormat.Length - startIndex));
return (tb.ToString());
}