|
|
@ -991,10 +991,14 @@ namespace Fungus |
|
|
|
{ |
|
|
|
{ |
|
|
|
command.OnCommandRemoved(block); |
|
|
|
command.OnCommandRemoved(block); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Order of destruction is important here for undo to work |
|
|
|
|
|
|
|
Undo.DestroyObjectImmediate(command); |
|
|
|
|
|
|
|
|
|
|
|
Undo.RecordObject(flowchart.selectedBlock, "Delete"); |
|
|
|
Undo.RecordObject(flowchart.selectedBlock, "Delete"); |
|
|
|
flowchart.selectedBlock.commandList.RemoveAt(i); |
|
|
|
flowchart.selectedBlock.commandList.RemoveAt(i); |
|
|
|
Undo.DestroyObjectImmediate(command); |
|
|
|
|
|
|
|
lastSelectedIndex = i; |
|
|
|
lastSelectedIndex = i; |
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|