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 #298273: divider not displayed in some cases #5523

Merged
merged 1 commit into from
Mar 12, 2020

Conversation

MarcSabatella
Copy link
Contributor

Resolves: https://musescore.org/en/node/298273

System dividers were not being displayed in certain cases:
if a fixed spacer is used, or in single page view.
In addition, dividers were displaying that shouldn't be
if layout changes and a system that was formerly not last on page
suddenly becomes last on page,
This is due to a series of errors in layoutPage()
where the dividers are managed.
This fix involves a number of aspects:

  1. checkDivider now takes an extra boolean parameter to force deletion
  2. we always call checkDivider with that parameter set to true
    for the last system of a page
  3. in the case where we don't stretch system distance
    (the clause checking sList, noVerticalStretch, or System layout mode),
    don't just remove dividers, but do the normal checkDivider call,
    which adds or removes dividers as appropriate
  4. in the calls to checkDivider at the end of the function
    (which handle the normal case of non-final systems on the page),
    dion't skip the checkDivider calls if a system hasFixedDownDistance.
    I believe that check was added because it is appropriate in other places
    that also check vBox, so it may have looked like this code should match.
    But it shouldn't, there is no reason to skip dividers in this case.
    Only the stretch calculations should be skipped.

vtest added

Resolves: https://musescore.org/en/node/298273

System dividers were not being displayed in certain cases:
if a fixed spacer is used, or in single page view.
In addition, dividers were displaying that shouldn't be
if layout changes and a system that was formerly not last on page
suddenly becomes last on page,
This is due to a series of errors in layoutPage()
where the dividers are managed.
This fix involves a number of aspects:
1) checkDivider now takes an extra boolean parameter to force deletion
2) we always call checkDivider with that parameter set to true
for the last system of a page
3) in the case where we don't stretch system distance
(the clause checking sList, noVerticalStretch, or System layout mode),
don't just remove dividers, but do the normal checkDivider call,
which adds or removes dividers as appropriate
4) in the calls to checkDivider at the end of the function
(which handle the normal case of non-final systems on the page),
dion't skip the checkDivider calls if a system hasFixedDownDistance.
I believe that check was added because it is appropriate in other places
that also check vBox, so it may have looked like this code should match.
But it shouldn't, there is no reason to skip dividers in this case.
Only the stretch calculations should be skipped.
@MarcSabatella
Copy link
Contributor Author

FWIW, this to me should be considered for 3.4

@dmitrio95 dmitrio95 merged commit 42da9ca into musescore:master Mar 12, 2020
This pull request was closed.
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.

2 participants