This commit is contained in:
Kathy Ruffing 2010-09-28 18:22:08 +00:00
parent 63ea75f998
commit fd69da45b9

View File

@ -336,19 +336,19 @@ namespace Volian.Controls.Library
StepRTB lastRTB = _SelectedStepRTB; StepRTB lastRTB = _SelectedStepRTB;
if(value != null) if(value != null)
value.BackColor = ActiveColor; // Set the active color value.BackColor = ActiveColor; // Set the active color
if (_SelectedStepRTB == value) return; // Same - No Change if (lastRTB == value) return; // Same - No Change
//RHM ToDo: Why doesn't it have focus for copy Step/Paste //RHM ToDo: Why doesn't it have focus for copy Step/Paste
if (value != null) value.Focus(); if (value != null) value.Focus();
if (_SelectedStepRTB != null && _SelectedStepRTB.BeingDisposed == false) if (lastRTB != null && lastRTB.BeingDisposed == false)
{ {
//_SelectedStepRTB.BackColor = InactiveColor; //_SelectedStepRTB.BackColor = InactiveColor;
_SelectedStepRTB.SetBackColor(); lastRTB.SetBackColor();
bool shouldDelete = !_SelectedStepRTB.MyStepItem.BeingRemoved && _SelectedStepRTB.Text.Length == 0; bool shouldDelete = !lastRTB.MyStepItem.BeingRemoved && lastRTB.Text.Length == 0;
if (shouldDelete) if (shouldDelete)
{ {
if (_SelectedStepRTB.MyStepItem.HasChildren) if (lastRTB.MyStepItem.HasChildren)
{ {
if (value != null && value.MyItemInfo.HasAncestor(_SelectedStepRTB.MyItemInfo)) if (value != null && value.MyItemInfo.HasAncestor(lastRTB.MyItemInfo))
{ {
shouldDelete = false; shouldDelete = false;
} }
@ -361,20 +361,20 @@ namespace Volian.Controls.Library
} }
if (shouldDelete) if (shouldDelete)
{ {
StepItem newFocus = _SelectedStepRTB.MyStepItem.DeleteItem(); StepItem newFocus = lastRTB.MyStepItem.DeleteItem();
_SelectedStepRTB.MyStepItem.Dispose(); lastRTB.MyStepItem.Dispose();
newFocus.SetAllTabs(); newFocus.SetAllTabs();
newFocus.AdjustLocation(); newFocus.AdjustLocation();
} }
else else
{ {
_SelectedStepRTB.SaveText(); // Save any changes to the text lastRTB.SaveText(); // Save any changes to the text
_SelectedStepRTB.SaveConfig(); // This may be redundant lastRTB.SaveConfig(); // This may be redundant
//int selst = _SelectedStepRTB.SelectionStart; //int selst = _SelectedStepRTB.SelectionStart;
_SelectedStepRTB.RTBFillIn(false); lastRTB.RTBFillIn(false);
//_SelectedStepRTB.SetSelection(selst, 0); //_SelectedStepRTB.SetSelection(selst, 0);
//_SelectedStepRTB.SelectionStart=selst; //_SelectedStepRTB.SelectionStart=selst;
_SelectedStepRTB.ViewRTB = true; lastRTB.ViewRTB = true;
} }
} }
_SelectedStepRTB = value; _SelectedStepRTB = value;