-
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 #315636: no space between barline and note with invisible key or time signature #7328
fix #315636: no space between barline and note with invisible key or time signature #7328
Conversation
Resolves: https://musescore.org/en/node/315636 When code was added to better handle invisible key or time signatures at the beginning of a score, this inadvertently affected spacing between barline and first note if there were invisible key or time signature changes later. The spacing was never actually *correct* here - it was controlled by the key or time signature margin - but it more or less worked and scores depended on it. The problem is that the changes made involved setitng the width of these invisible segments to 0 and skipping them. Whereas previously, they got processed enough to yield some space betwene the barline and first note. The firx here is just to limit the effect of the previous change so not *all* segments with all elements invisible, but only those in system header measures, or segments after the beginning of the measure. Thus we continue to handle beginnings of scores and systems well, and also courtesies at the end of measures. But we revert to the previous behavior for key or time signatures at the beginning of measures that are *not* headers. Again, it wasn't ideal, but it basically worked, nand now works again the same way. I left TODO's in the code to indicate something of what would need to happen to fix this "for real", with the space controlled by barNoteDistance as the user expects, rather than depending on the key or time signature margins. A quick attempt to implement this led to problems that convinced me to put it off until a larger scale rewrite of the spacing algorithms as a whole.
Yes. See discussion on Telegram. My PR restores 3.5.2 behavior that people are already used to and have adjusted for where needed. The above clearly shows too little space after the barline in 3.6. It is barely sufficient in that example, but consider what happens if there is an accidental or second: versus with my P (and same in 3.5.2): It is true that there is slightly too much space in the case of the invisible time signature as compared to key signature, but that's inconsequential in comparison. And again it's the same in 3.5.2. That's because the space here is not barNoteDistance as it should be (but never has been), instead it's controlled by the margin settings for the key and time signatures respectively, which happen to differ slightly. [ note: originally this had the wrong images, fixed now ] |
Also, to be clear: the amount of space in 3.6 here might be similar between invisible key and time signatures, but it's definitely way less than it should be - less than what it would be with no key or time signature at all. Here is 3.6: and here is my PR (same as 3.5.2, given same style settings): As noted, it's not perfectly consistent because were aren't using barNoteDistance. but it's workable, and accommodates accidentals or seconds, which 3.6 does not. |
…e with invisible key or time signature
…visible key or time signature
Resolves: https://musescore.org/en/node/315636
When code was added to better handle invisible key or time signatures
at the beginning of a score,
this inadvertently affected spacing between barline and first note
if there were invisible key or time signature changes later.
The spacing was never actually correct here -
it was controlled by the key or time signature margin -
but it more or less worked and scores depended on it.
The problem is that the changes made involved
setting the width of these invisible segments to 0
and skipping them.
Whereas previously, they got processed enough
to yield some space between the barline and first note.
The firx here is just to limit the effect of the previous change
so not all segments with all elements invisible,
but only those in system header measures,
or segments after the beginning of the measure.
Thus we continue to handle beginnings of scores and systems well,
and also courtesies at the end of measures.
But we revert to the previous behavior for key or time signatures
at the beginning of measures that are not headers.
Again, it wasn't ideal, but it basically worked,
nand now works again the same way.
I left TODO's in the code to indicate something
of what would need to happen to fix this "for real",
with the space controlled by barNoteDistance as the user expects,
rather than depending on the key or time signature margins.
A quick attempt to implement this led to problems
that convinced me to put it off until a larger scale rewrite
of the spacing algorithms as a whole.