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 transpose and keysig undo #65

Closed
wants to merge 9 commits into from

Conversation

heuchi
Copy link
Contributor

@heuchi heuchi commented Sep 7, 2012

2 changes in libmscore/undo.cpp:

orig. line 1735:
keysig->staff()->setKey(keysig->segment()->tick(), ks);
was commented out. It does however fix the issue 16506. Do I miss any negative side effects?

starting orig. line 1647:
qSwap(oldElement, newElement) was called too early.
setUpdateKeymap(true) doesn't work because the call to score->cmdUpdateNotes() in Score::undoChangeKeySig will still use the old keymap.

@heuchi
Copy link
Contributor Author

heuchi commented Sep 9, 2012

I decided to combine this and 18105 because they are both about undo/redo. Testing one without the other is almost impossible.
I'm adding a Score::undoChangeTransposingState to create undo events for a new '_transposing' state variable in Score, since updateAccidentals needs to keep all ACC_USER when transposing. When not transposing however, updateAccidentals should reset ACC_USER accidentals that become needed to ACC_AUTO. For redo of a transposition it is neccessary, that _transposing is again set and reset.
I also changed undoChangePitch to know if we're undoing or redoing, since for the latter it has to remove ACC_USER accidentals when the tpc changes.
I hope this makes sense. I'm looking forward to hearing comments.

@heuchi
Copy link
Contributor Author

heuchi commented Sep 12, 2012

This might need some more testing, once the parts function workes properly. Also see http://musescore.org/en/node/18099

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

1 participant