From 9ca4eda235c40287d5281c75c5195d340a6ccee1 Mon Sep 17 00:00:00 2001 From: Rich Date: Wed, 20 Feb 2013 23:06:29 +0000 Subject: [PATCH] Logic was added to the indent code to keep the indent code from going into an infinite loop --- PROMS/Volian.Controls.Library/StepRTB.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/PROMS/Volian.Controls.Library/StepRTB.cs b/PROMS/Volian.Controls.Library/StepRTB.cs index 99dcb9a0..ce3ef686 100644 --- a/PROMS/Volian.Controls.Library/StepRTB.cs +++ b/PROMS/Volian.Controls.Library/StepRTB.cs @@ -479,7 +479,13 @@ namespace Volian.Controls.Library { 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. } } OrigRTF = Rtf;