Implement code for DontResetIndentOnNewline for BGE
This commit is contained in:
@@ -481,19 +481,31 @@ namespace Volian.Controls.Library
|
||||
|
||||
// this line of code was moved before the find for the indent so that
|
||||
// the window gets resized if the indent changes the height, i.e. more line(s) in window.
|
||||
AddEventHandlers();
|
||||
|
||||
while ((indchar = Find(indentToken, indchar, RichTextBoxFinds.None)) >= 0)
|
||||
AddEventHandlers();
|
||||
if (MyItemInfo.InList(186722)) Console.WriteLine("here");
|
||||
if ((indchar = Find(indentToken, indchar, RichTextBoxFinds.None)) >= 0)
|
||||
{
|
||||
Point indent = GetPositionFromCharIndex(indchar);
|
||||
SelectionHangingIndent = indent.X;
|
||||
// RHM 02/20/2013
|
||||
// The following line attempts to remove the indent character for display purposes.
|
||||
// However, if the indent is followed immediately by an RO or Transition the
|
||||
// RichTextBox will not allow the character to be removed this way and the RichTextBox
|
||||
// will beep. So, to keep from going in an infintie loop, the value of indchar is incremented.
|
||||
SelectedRtf = SelectedRtf.Replace(@"\'05","");
|
||||
indchar ++;// Don't so the same one twice.
|
||||
int nindents = 0;
|
||||
while ((indchar = Find(indentToken, indchar, RichTextBoxFinds.None)) >= 0)
|
||||
{
|
||||
nindents++;
|
||||
Point indent = GetPositionFromCharIndex(indchar);
|
||||
SelectionHangingIndent = indent.X;
|
||||
|
||||
// RHM 02/20/2013
|
||||
// The following line attempts to remove the indent character for display purposes.
|
||||
// However, if the indent is followed immediately by an RO or Transition the
|
||||
// RichTextBox will not allow the character to be removed this way and the RichTextBox
|
||||
// will beep. So, to keep from going in an infintie loop, the value of indchar is incremented.
|
||||
SelectedRtf = SelectedRtf.Replace(@"\'05", "");
|
||||
indchar++;// Don't so the same one twice.
|
||||
}
|
||||
if (MyItemInfo != null && MyItemInfo.ActiveFormat != null
|
||||
&& MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.DontResetIndentOnNewline)
|
||||
{
|
||||
if (nindents == 1) Rtf = Rtf.Replace("\\par\r\n", @"\line ");
|
||||
Rtf = Rtf.Replace(@"\line\pard", @"\line");
|
||||
}
|
||||
}
|
||||
}
|
||||
OrigRTF = Rtf;
|
||||
|
Reference in New Issue
Block a user