Menu

#1727 Matrix Editor Undo does not work for deleted segments

None
open
nobody
None
5
2025-07-04
2025-06-30
musewhirl
No

In the test below, this happened for a linked segment. I didn't test unlinked segments, but guess that it behaves the same for them too.

Steps to reproduce:

  1. Create a track with multiple segments containing notes, one of which is a linked segment
  2. Select the track (which selects all segments)
  3. Hit the M key to open the Matrix Editor
  4. Return to the main RG window, delete a linked segment
  5. Return to the Matrix Editor, and the notes for that section are correctly missing
  6. In the Matrix Editor, execute CTRL-Z. The section remains missing in the Matrix Editor
  7. Go to the main RG window, and the section is actually there, correctly reverted

At some point when this happened the first time, RG did crash...and I should add, for only the second time for me in years (as per a post in bug #1725). On restarting the session, RG was not aware of the crash...and although uncertain, I don't think anything was lost anyway...perhaps timing? Repeating the steps did not reproduce the crash, but the behavior of the missing section is reproducible.

The onus might be on the user to close and reopen the Matrix Editor, but under other circumstances RG automatically closes the Editor when a relevant segment is deleted. And without closing, the revert of the missing section is not noticeable from that particular instance of the Matrix Editor, and notes are never added there again obviously, even to the same reverted segment. It's possible that the crash was related to continuing to work outside of the Matrix Editor on the reverted segment or a new one added in its place, and another editor opened on those...but that is just a guess.

Discussion

  • Philip Leishman

    Philip Leishman - 2025-07-01

    I don't think this is a bug.
    The undo function guarantees (hopefully) the status of the song (document). It does not necessarily guarantee the status of the editors. When the segment is deleted it is removed from the matrix editor. On undo the segment is restored. The matrix editor must be opened on the track again to get all the segments included.

     
  • Ted Felix

    Ted Felix - 2025-07-01

    This should be doable by having matrix keep a master list of the segment IDs (see Segment::m_runtimeSegmentId) it was launched with. Then monitor to see if any come and go when the document changes.

     

    Last edit: Ted Felix 2025-07-01
  • musewhirl

    musewhirl - 2025-07-01

    I normally reopen the Matrix Editor, so it's not a problem, but this time the editor was hidden behind the main window.

    However, RG did crash around that time (not reproducible), and since crashes are so rare it's possibly related. I will most likely go back to my original workflow of ensuring that the editor is reopened on segment deletion. Feel free to close this bug if it's to be considered an acceptable feature.

     
  • Philip Leishman

    Philip Leishman - 2025-07-04

    Yes the runtimeSegmentId should make this possible - but still not trivial. The notation editor would have to do it too.
    But I think this is feature creep for the undo functionality. Where does it stop - should undo take back preference changes ? What about restoring window geometry ? etc.
    If the crash can be reproduced that would be far more important.

     

Log in to post a comment.

MongoDB Logo MongoDB