B2021-002: crash after delete of step with incoming transitions

This commit is contained in:
Kathy Ruffing 2021-01-12 14:20:28 +00:00
parent fdd59a5d6b
commit 5302cf398a

View File

@ -866,6 +866,7 @@ namespace Volian.Controls.Library
} }
} }
BeingRemoved = true; BeingRemoved = true;
EditItem tmpSelEI = MyStepPanel.SelectedEditItem; // B2021-002: if can't remove, reset SelectedEditItem
MyStepPanel.SelectedEditItem = null; // Unselect the item to be deleted MyStepPanel.SelectedEditItem = null; // Unselect the item to be deleted
//ShowTops("\r\n"); //ShowTops("\r\n");
int TopMostYBefore = TopMostEditItem.Top; int TopMostYBefore = TopMostEditItem.Top;
@ -880,6 +881,7 @@ namespace Volian.Controls.Library
if (newFocus == null) if (newFocus == null)
{ {
MyStepPanel.Controls.Remove(pnl); MyStepPanel.Controls.Remove(pnl);
MyStepPanel.SelectedEditItem = tmpSelEI; // B2021-002: if can't remove, reset SelectedEditItem
return; return;
} }
//_MyTimer.ActiveProcess = "SetFocus"; //_MyTimer.ActiveProcess = "SetFocus";