Possible Bug With Transport Object

Hello! So I’ve been hacking away at an interesting feature request for altering the transport loop based on how a pattern is split.

I have found some interesting things that break when I attempted to get this to work:

  1. When undoing an action that includes altering the transport loop, the loop changes remain.
  2. If the transport loop is positioned outside of the sequence index, weird behavior happens.

For example, say I have a loop that surrounds a couple patterns at the very end of my song. If I want to split my current pattern, this will push the loop down N-1 rows where N is the number of patterns I want to split from my original. This works all fine and dandy, but if I UNDO, the transport loop indices remain the same, and are referencing rows that are OUTSIDE the pattern sequence.

Just some food for thought. I definitely feel that alterations to the transport loop should be recorded in the undo stack. Any thoughts?