From 9474d194c863b20f0278268760a64336dcb7d5a2 Mon Sep 17 00:00:00 2001 From: Kathy Date: Tue, 8 Feb 2011 11:29:26 +0000 Subject: [PATCH] --- .../DisplayTransition.cs | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/PROMS/Volian.Controls.Library/DisplayTransition.cs b/PROMS/Volian.Controls.Library/DisplayTransition.cs index ee538ddf..62c8d183 100644 --- a/PROMS/Volian.Controls.Library/DisplayTransition.cs +++ b/PROMS/Volian.Controls.Library/DisplayTransition.cs @@ -963,18 +963,22 @@ namespace Volian.Controls.Library linktxt = string.Format("#Link:Transition:{0} {1}", listBoxTranFmt.SelectedIndex, toItem.ItemID); } // Can I build the text right now? - trantxt = TransitionText.GetResolvedText(_MyRTB.MyItemInfo, listBoxTranFmt.SelectedIndex,toItem,rangeItem ?? toItem); - int ss = _MyRTB.SelectionStart;// Remember where the link is being added - _MyRTB.InsertTran(trantxt, linktxt);// Insert the LINK - _MyRTB.SaveText();// Save the text with the LINK - This also moves the cursor to the end of the text + trantxt = TransitionText.GetResolvedText(MyRTB.MyItemInfo, listBoxTranFmt.SelectedIndex,toItem,rangeItem ?? toItem); + int ss = MyRTB.SelectionStart;// Remember where the link is being added + int sl = MyRTB.SelectionLength; + MyRTB.OnReturnToEditor(this, new EventArgs()); + MyRTB.Select(ss, sl); + MyRTB.InsertTran(trantxt, linktxt);// Insert the LINK + MyRTB.OnDoSaveContents(this, new EventArgs()); //.SaveText();// Save the text with the LINK - This also moves the cursor to the end of the text // By selecting a starting position within a link, StepRTB (HandleSelectionChange) will select the link - _MyRTB.Select(ss + 7 + trantxt.Length, 0);// Try 7 for