Browse Source

Copy commands in execution order, not selection order

master
chrisgregan 10 years ago
parent
commit
834e1de34e
  1. 6
      Assets/Fungus/FungusScript/Editor/SequenceEditor.cs

6
Assets/Fungus/FungusScript/Editor/SequenceEditor.cs

@ -531,7 +531,10 @@ namespace Fungus
CommandCopyBuffer commandCopyBuffer = CommandCopyBuffer.GetInstance(); CommandCopyBuffer commandCopyBuffer = CommandCopyBuffer.GetInstance();
commandCopyBuffer.Clear(); commandCopyBuffer.Clear();
foreach (Command command in fungusScript.selectedCommands) // Scan through all commands in execution order to see if each needs to be copied
foreach (Command command in fungusScript.selectedSequence.commandList)
{
if (fungusScript.selectedCommands.Contains(command))
{ {
System.Type type = command.GetType(); System.Type type = command.GetType();
Command newCommand = Undo.AddComponent(commandCopyBuffer.gameObject, type) as Command; Command newCommand = Undo.AddComponent(commandCopyBuffer.gameObject, type) as Command;
@ -542,6 +545,7 @@ namespace Fungus
} }
} }
} }
}
protected void Paste() protected void Paste()
{ {

Loading…
Cancel
Save