From c063a11a1a696bda407dd51b059dfc730b94e194 Mon Sep 17 00:00:00 2001 From: Kathy Date: Tue, 27 Jan 2009 15:50:55 +0000 Subject: [PATCH] --- PROMS/Volian.Controls.Library/StepRTB.cs | 7 ++++--- PROMS/Volian.Controls.Library/StepTabRibbon.cs | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/PROMS/Volian.Controls.Library/StepRTB.cs b/PROMS/Volian.Controls.Library/StepRTB.cs index 9f2a3218..5f3bc9b9 100644 --- a/PROMS/Volian.Controls.Library/StepRTB.cs +++ b/PROMS/Volian.Controls.Library/StepRTB.cs @@ -190,7 +190,7 @@ namespace Volian.Controls.Library this.KeyUp += new KeyEventHandler(StepRTB_KeyUp); this.KeyDown += new KeyEventHandler(StepRTB_KeyDown); this.TextChanged += new EventHandler(StepRTB_TextChanged); - //this.SelectionChanged += new EventHandler(DisplayRTB_SelectionChanged); + this.SelectionChanged +=new EventHandler(StepRTB_SelectionChanged); } void MyConfig_PropertyChanged(object sender, PropertyChangedEventArgs e) @@ -207,10 +207,11 @@ namespace Volian.Controls.Library MyLinkText = null; } } - + public bool inRoAdd = false; void StepRTB_SelectionChanged(object sender, EventArgs e) { - Console.WriteLine("SelectionStart {0}, SelectionLength {1}", SelectionStart, SelectionLength); + if (inRoAdd) + Console.WriteLine("SelectionStart {0}, SelectionLength {1}", SelectionStart, SelectionLength); if (!SelectionProtected && MyLinkText != null) MyLinkText = null; } #endregion diff --git a/PROMS/Volian.Controls.Library/StepTabRibbon.cs b/PROMS/Volian.Controls.Library/StepTabRibbon.cs index c74519de..b8be6185 100644 --- a/PROMS/Volian.Controls.Library/StepTabRibbon.cs +++ b/PROMS/Volian.Controls.Library/StepTabRibbon.cs @@ -44,7 +44,7 @@ namespace Volian.Controls.Library void _MyStepRTB_LinkChanged(object sender, StepPanelLinkEventArgs args) { // do all Transition and ReferencedObject menu items/buttons based on whether a 'link is selected' and the link type. - btnCMGoTo.Enabled = btnGoTo.Enabled = _MyStepRTB.SelectionProtected; //(_MyStepRTB.MyLinkText != null); + btnCMGoTo.Enabled = btnGoTo.Enabled = _MyStepRTB.SelectionProtected; if (btnCMGoTo.Enabled == true && _MyStepRTB.MyLinkText != null) // must have some link test, use it to set edit of transition or ro... { btnCMEditTran.Enabled = _MyStepRTB.MyLinkText.IndexOf("Transition") > -1; // selected link must be a transition