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

Lyrics: crash when copy+undo+paste #198

Open
matevz opened this issue Dec 27, 2022 · 0 comments
Open

Lyrics: crash when copy+undo+paste #198

matevz opened this issue Dec 27, 2022 · 0 comments
Labels
bug Something isn't working copy&paste Bugs/Features related to copy&pasting elements lyrics Bugs/Features related to lyrics
Milestone

Comments

@matevz
Copy link
Member

matevz commented Dec 27, 2022

Steps to reproduce:

  1. add some notes and some lyrics
  2. copy some syllables
  3. undo
  4. paste syllables => CRASH

It smells as if the document which the clipboard is relying on was deleted before pasting is made. Doing copy&undo&paste on notes in staff doesn't crash though 🤔

Suggested solution:

  • when copy is triggered, CLONE the document and store it in memory along with the references of elements to be pasted
  • this makes copy&pasting oblivious to future document changes
  • but probably requires that each clone() also returns a map of QMap<void*,void*> old -> new so that you can reference the elements to be pasted somehow. This feature would also be useful in the UI when calling undo/redo so it can remember the selection.
@matevz matevz added bug Something isn't working copy&paste Bugs/Features related to copy&pasting elements lyrics Bugs/Features related to lyrics labels Dec 27, 2022
@matevz matevz added this to the 0.7.4 milestone Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working copy&paste Bugs/Features related to copy&pasting elements lyrics Bugs/Features related to lyrics
Projects
None yet
Development

No branches or pull requests

1 participant