This commit is contained in:
Kathy Ruffing 2009-01-27 15:50:55 +00:00
parent 68998360df
commit c063a11a1a
2 changed files with 5 additions and 4 deletions

View File

@ -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

View File

@ -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