This commit is contained in:
parent
63ea75f998
commit
fd69da45b9
@ -336,19 +336,19 @@ namespace Volian.Controls.Library
|
||||
StepRTB lastRTB = _SelectedStepRTB;
|
||||
if(value != null)
|
||||
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
|
||||
if (value != null) value.Focus();
|
||||
if (_SelectedStepRTB != null && _SelectedStepRTB.BeingDisposed == false)
|
||||
if (value != null) value.Focus();
|
||||
if (lastRTB != null && lastRTB.BeingDisposed == false)
|
||||
{
|
||||
//_SelectedStepRTB.BackColor = InactiveColor;
|
||||
_SelectedStepRTB.SetBackColor();
|
||||
bool shouldDelete = !_SelectedStepRTB.MyStepItem.BeingRemoved && _SelectedStepRTB.Text.Length == 0;
|
||||
lastRTB.SetBackColor();
|
||||
bool shouldDelete = !lastRTB.MyStepItem.BeingRemoved && lastRTB.Text.Length == 0;
|
||||
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;
|
||||
}
|
||||
@ -361,20 +361,20 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
if (shouldDelete)
|
||||
{
|
||||
StepItem newFocus = _SelectedStepRTB.MyStepItem.DeleteItem();
|
||||
_SelectedStepRTB.MyStepItem.Dispose();
|
||||
StepItem newFocus = lastRTB.MyStepItem.DeleteItem();
|
||||
lastRTB.MyStepItem.Dispose();
|
||||
newFocus.SetAllTabs();
|
||||
newFocus.AdjustLocation();
|
||||
}
|
||||
else
|
||||
{
|
||||
_SelectedStepRTB.SaveText(); // Save any changes to the text
|
||||
_SelectedStepRTB.SaveConfig(); // This may be redundant
|
||||
lastRTB.SaveText(); // Save any changes to the text
|
||||
lastRTB.SaveConfig(); // This may be redundant
|
||||
//int selst = _SelectedStepRTB.SelectionStart;
|
||||
_SelectedStepRTB.RTBFillIn(false);
|
||||
lastRTB.RTBFillIn(false);
|
||||
//_SelectedStepRTB.SetSelection(selst, 0);
|
||||
//_SelectedStepRTB.SelectionStart=selst;
|
||||
_SelectedStepRTB.ViewRTB = true;
|
||||
lastRTB.ViewRTB = true;
|
||||
}
|
||||
}
|
||||
_SelectedStepRTB = value;
|
||||
|
Loading…
x
Reference in New Issue
Block a user