diff --git a/Apollo/Devices/Flip.cs b/Apollo/Devices/Flip.cs index b7558ddb..80c2c05c 100644 --- a/Apollo/Devices/Flip.cs +++ b/Apollo/Devices/Flip.cs @@ -42,7 +42,10 @@ public Flip(FlipType mode = FlipType.Horizontal, bool bypass = false): base("fli } public override void MIDIProcess(List n) - => InvokeExit((Bypass? n.Select(i => i.Clone()) : Enumerable.Empty()).Concat(n.Select(i => { + => InvokeExit((Bypass? n.Select(i => i.Clone()) : Enumerable.Empty()).Concat(n.SelectMany(i => { + if (i.Index == 100) + return Bypass? Enumerable.Empty() : new [] {i}; + int x = i.Index % 10; int y = i.Index / 10; @@ -64,7 +67,7 @@ public override void MIDIProcess(List n) } i.Index = (byte)(y * 10 + x); - return i; + return new [] {i}; })).ToList()); public class ModeUndoEntry: EnumSimplePathUndoEntry { diff --git a/Apollo/Devices/Rotate.cs b/Apollo/Devices/Rotate.cs index 3cad33f0..ccecf267 100644 --- a/Apollo/Devices/Rotate.cs +++ b/Apollo/Devices/Rotate.cs @@ -42,7 +42,10 @@ public Rotate(RotateType mode = RotateType.D90, bool bypass = false): base("rota } public override void MIDIProcess(List n) - => InvokeExit((Bypass? n.Select(i => i.Clone()) : Enumerable.Empty()).Concat(n.Select(i => { + => InvokeExit((Bypass? n.Select(i => i.Clone()) : Enumerable.Empty()).Concat(n.SelectMany(i => { + if (i.Index == 100) + return Bypass? Enumerable.Empty() : new [] {i}; + if (Mode == RotateType.D90) i.Index = (byte)((9 - i.Index % 10) * 10 + i.Index / 10); @@ -52,7 +55,7 @@ public override void MIDIProcess(List n) else if (Mode == RotateType.D270) i.Index = (byte)((i.Index % 10) * 10 + 9 - i.Index / 10); - return i; + return new [] {i}; })).ToList()); public class ModeUndoEntry: EnumSimplePathUndoEntry {