Crash when undoing tie

• Feb 26, 2015 - 17:30
Type
Wording/Translation
Severity
S4 - Minor
Status
closed
Project

96c7028896

  1. Create a score in 4/4
  2. Enter 5 tied quarter notes from first mesure to first beat of second measure
  3. Select the first measure, Copy
  4. Select the 3rd mesure, Paste
  5. Undo

Crash, at least in debug mode. It crashes here https://github.com/musescore/MuseScore/blob/96c7028896dadd889a24c2ba533…

My guess is that it's related to
Fix to #48811: Redo Paste does not restore ties
https://github.com/musescore/MuseScore/commit/c47ec85d4a7e0b5ee5979e8c6…
and
Fix for #46356: crash after undo of paste that creates tie forward
https://github.com/musescore/MuseScore/commit/5b371444c49cf280191c426f2…


Comments

Hopefully the fix is much simpler.

1/
It reverts https://github.com/musescore/MuseScore/commit/5b371444c49cf280191c426f2… and change the behavior so pending ties at the end of the "clipboard" are now removed. It's aligned with the fact that these ties are not highlighted in the copied selection.

2/ It removes the call to the undo stack while reading a tie in clipboard mode.

I tested the cases in this issue, in #48811: Redo Paste does not restore ties and in #46356: crash after undo of paste that creates tie forward. and it seems to work.