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 #315636: no space between barline and note with invisible key or time signature #7328

Merged
merged 1 commit into from
Jan 27, 2021

Commits on Jan 25, 2021

  1. fix #315636: no space between barline and note with invisible 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
    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.
    MarcSabatella committed Jan 25, 2021
    Configuration menu
    Copy the full SHA
    f986a43 View commit details
    Browse the repository at this point in the history