Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #290187: crash on paste clef/key/time signature #5098

Merged
merged 1 commit into from
Jun 13, 2019

Conversation

MarcSabatella
Copy link
Contributor

See https://musescore.org/en/node/290187

Crash comes from my code to re-establish the selection upon pasting an element onto another of the same type. Turns out my assumption that this resulted in replacing the target with the new element is wrong elements other than notes. So, I've adjusted this code to be more specific: we do the special handling only when dropping notes. In that case, we deselect the target because we know it is being replaced, then select the new note when dropping a note onto a nother note. We don't select anything here when dropping a note onto a rest because it turns out both the original rest and the dropped note are invalid here because a new note is generated (and, luckily, selected for us) in ChordRest::drop().

Tested now with combinations or notes, rests, clefs, key & time signatures, and also pasting other elements (text, articuations, etc) onto notes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants