From c72ca9fb52bf5d40f43b7da49158b52f519ded45 Mon Sep 17 00:00:00 2001 From: Rich Date: Thu, 5 Nov 2009 22:42:22 +0000 Subject: [PATCH] Linked text was being displayed as text rather than a links for Cautions and Notes. This was because the overall style for Cautions and Notes (Italic) was being applied after the links were added. This was changed to use the selection and it appears to work properly. --- PROMS/Volian.Controls.Library/StepRTB.cs | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/PROMS/Volian.Controls.Library/StepRTB.cs b/PROMS/Volian.Controls.Library/StepRTB.cs index 89d0efec..c37394fd 100644 --- a/PROMS/Volian.Controls.Library/StepRTB.cs +++ b/PROMS/Volian.Controls.Library/StepRTB.cs @@ -663,10 +663,30 @@ namespace Volian.Controls.Library RTBAPI.ToggleBold(true, this, RTBAPI.RTBSelection.SCF_SELECTION); this.Select(0, 0); } + // Bug Fix + // The code below was changed to select all of the text and then + // apply the underlining to the selected text, because if the + // the underlining was applied to RTBAPI.RTBSelection.SCF_ALL + // the Links were changed so that they were no longer hidden. if ((_origDisplayText.TextFont.Style & E_Style.Underline) > 0) - RTBAPI.ToggleUnderline(true, this, RTBAPI.RTBSelection.SCF_ALL); + // RTBAPI.ToggleUnderline(true, this, RTBAPI.RTBSelection.SCF_ALL); + { + this.SelectAll(); + RTBAPI.ToggleUnderline(true, this, RTBAPI.RTBSelection.SCF_SELECTION); + this.Select(0, 0); + } + // Bug Fix + // The code below was changed to select all of the text and then + // apply the italics to the selected text, because if the + // the italics was applied to RTBAPI.RTBSelection.SCF_ALL + // the Links were changed so that they were no longer hidden. if ((_origDisplayText.TextFont.Style & E_Style.Italics) > 0) - RTBAPI.ToggleItalic(true, this, RTBAPI.RTBSelection.SCF_ALL); + // RTBAPI.ToggleItalic(true, this, RTBAPI.RTBSelection.SCF_ALL); + { + this.SelectAll(); + RTBAPI.ToggleItalic(true, this, RTBAPI.RTBSelection.SCF_SELECTION); + this.Select(0, 0); + } } #endregion #region HeightSupport