Undo with slurs

• Mar 19, 2021 - 00:19

I made an error in adding slurs, and when I tried to use Undo to, well, undo it, MS would not return to the earlier state.

The error was in selecting notes to apply the slurs. In the upper system, I CTRL-clicked the first and last note of the group and clicked the slur item in the palette. In the lower system, I accidentally selected the second group while the first was still active. (essentially four anchor points were selected instead of two.) The result was four slurs where only two were desired.

That was me. I get that. Mistake. Undo should have fixed it.

Instead, Undo only removes one of the offending slurs (at best) before skipping back to previous edits. Sometimes, when trying to recreate this behaviour, Undo has added MORE slurs to notes which weren't even selected. This may have something to do with the order in which I selected the notes to which to add slurs.

I don't know if the attached excerpt will be of much help, as a saved file has no Undo stack, but I'd be interested to know if anyone gets the same results as I did. You'd have to play around adding/undoing the slurs to create your own stack.

MS 3.6.2 Win10

Attachment Size
Slur bug test.mscz 6.95 KB

Comments

Further investigation of this reveals that Undo will remove ONE improperly inserted slur, but no more. (Because they result from user error, where multiple anchor notes are selected, they usually appear in pairs or groups all at once.) Subsequent extraneous slurs must be manually deleted.

This is where it gets interesting... Undo works just fine in reinserting manually deleted (albeit incorrect) slurs.

There are a couple of other Undo-related anomalies which I haven't been able to nail down yet. One appears to result from Undo-ing copied and pasted notes and slurs between different instruments, but so far I haven't been able to recreate the conditions that produce the error. I did manage to crash MS while trying to do so however.

In reply to by toffle

I am still unable to resolve this issue.

In the sample score attached to the original post, try the following:

  1. in the second violin staff, select the first note. Change it to an A.
    This provides a reference point for the following operations.
  2. Select via CTRL-Click the two A's in that measure and add a slur from the Lines palette.
    This should work as expected.
  3. While the two notes are still selected, select the two B's in the second measure via CTRl-Click and add a slur.
    This should introduce an error in the line, as four slur anchor points were selected. The result will be several slurs added with one click.
  4. Now try to reverse the operation, either via CTRL-Z or the Undo button.
    One (or sometimes two) of the extraneous slurs can be removed in this way.

Afterwards, Undo will go back to the previous edit, which will change the first note back to a C. This should be the beginning of the Undo stack, but there will be at least three slurs remaining, which are impossible to remove via Undo. Also, at this point, the score should no longer be marked as "dirty", but it is in a different state than it was when you opened it.

If you get different results than I do on my computer, then there is definitely something wrong on my end.

Win10, MS 3.6.2

Thanks so much.

In reply to by toffle

It should be noted that this issue does not exist with MS 2.x. The same wrongly inserted slurs appear, (albeit via double-click, as single click insertion was not implemented at that time.) but Undo removes them all without difficulty.
Whatever the problem is, it seems to have occurred at some time in the 3.x development.

In reply to by toffle

I can confirm the behaviour. However, only if I add slurs from the pallet. Using the keyboard shortcut "s" only adds a single slur covering the first two measures at step 3.

I think there are other cases where behaviour differs depending whether a keyboard shortcut or a pallet item is used. I wonder why there should be any difference. You would think that whatever method is used to trigger an operation the result would be the same. Is the code duplicated (inaccurately)?

[Edit] Here is another example of different behaviour of pallet v shortcut. In this case the pallet gets it right, the shortcut doesn't. https://musescore.org/en/node/297444

In reply to by SteveBlower

Adding via "S" does two things that I can see.
1. It still renders unwanted slurs when multiple anchor points are selected. (It is, after all, a user error.) In this case, however, the slurs are much fewer in number, and appear more logical.
2. it allows Undo to do its job as expected.

In reply to by toffle

I would not be so sure that two "slurs" covering the same notes is an error. The intention might be to have the longer one construed as a phrase marking with the shorten one a real slur. I am happy with the "S" behaviour. However, the pallet behaviour is bizarre.

In reply to by toffle

I can confirm the bug, I recommend filing it to the issue tracker with that score and the steps given in your response above.

I suspect it isn't a "simple slur" that triggers the problem, but rather the highly unusual triplet one that is created when following these steps - adding a slur where there is already one, then adding another as well but over multiple additional notes. Normal slur addition works fine with undo in my experience.

In reply to by Marc Sabatella

A simpler (minimal?) example that demonstrates the bug is:
1 enter three quarter notes on beats 1, 2, 3.
2 CTRL+CLICK to select all three notes (not as a range selection).
3 Click on the slur in the lines pallet.

This is what you get.
SlurBug.png

Then:

4 Undo 1
SlurBug undo1.png

5 Undo 2
SlurBug undo2.png

6 Undo 3
SlurBug undo3.png

7 Undo 4
SlurBug undo4.png

8 Undo 5 (stack is now empty).

SlurBug undo5.png

Do you still have an unanswered question? Please log in first to post your question.