-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 #294873: AUTO sharp/flat change to natural-sharp/natural-flat if there's double-sharp/double-flat before #5337
Conversation
7f6b37d
to
8cac2b3
Compare
ec3b08c
to
76c87b5
Compare
Another problem with this is that if a note has an implied (non-written) sharp/flat, and the user puts a double-sharp/double-flat at a note before it, then the accidental is displayed as a sharp/flat at first, but then on the next layout it is changed to natural-sharp/natural-flat. I am not sold on the idea of having natural-sharps and natural-flats appear automatically. Especially if it means that they do not display correctly if you try to add them manually, but I know that is something that you are trying to fix. Is it really necessary to do this in order to resolve the related issues? |
No, but I recall someone in the forum asking this and I think it's best to implement this while fixing the issues, if I can, ultimately. |
76c87b5
to
46f5c27
Compare
Fixed this ;-) |
I have an alternate solution to these two issues that does not involve automatically creating natural-sharps and natural-flats, and it does not suffer from your problem. It sort of depends on |
Thanks! |
It doesn't seem to be changeAccidental2(), because if I move this before the action of undoAddElement() the result is still (wrongly) the same. |
46f5c27
to
e8fb518
Compare
I thought you would be able to figure it out from what I showed you. Here it is again, but this time it is rebased on top of your changes: mattmcclinch@37bae0b. |
Oh, sorry, I just realized that mattmcclinch@37bae0b breaks some of the functionality that you added regarding automatically removing certain natural-sharps and natural-flats that were added automatically. But I think that a clue to solving your problem is still there. |
@mattmcclinch |
I believe that mattmcclinch@c6d21d9 is a complete fix for both issues, is it not? You are trying to accomplish something else based on a forum comment that you did not link to, and as far as I know, does not have a corresponding issue in the tracker. |
@mattmcclinch |
e8fb518
to
ba48cd2
Compare
Congratulations to myself! A complete fix completed! |
ba48cd2
to
2b98afb
Compare
45f2310
to
8e97caa
Compare
…there's double-sharp/double-flat before Resolves: https://musescore.org/node/294873. This fix is based on the following logic: - If the user put sharp/flat at one note, and put double-sharp/double-flat at a note before it, that sharp/flat automatically changes to natural-sharp/natural-flat. If the double-sharp/double-flat no longer exists, that natural-sharp/natural-flat reverts to sharp/flat; - If a natural-sharp/natural-flat is changed to regular sharp/flat by the user, that sharp/flat won't get changed later; - If the accidental should normally be sharp/flat but the user put natural-sharp/natural-flat intendedly, then that natural-sharp/natural-flat won't get changed later; - If a note has regular sharp/flat (natural-sharp/natural-flat are not affected) but a note in front of it is added natural-sharp/natural-flat, that sharp/flat is removed. The most probable cause of #279179 and #293984 is isMicrotonal(), which treats natural-sharp/natural-flat/sharp-sharp wrongly as microtonal. PR musescore#5341 fixes these two, but it still treats those three as microtonal. In order to implement #294873 this has to be changed.
8e97caa
to
9cb3f07
Compare
Resolves: https://musescore.org/node/294873.
This fix is based on the following logic:
The most probable cause of #279179 and #293984 is isMicrotonal(), which treats natural-sharp/natural-flat/sharp-sharp wrongly as microtonal. PR #5341 fixes these two, but it still treats those three as microtonal. In order to implement #294873 this has to be changed.