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 #290409 - Stave brackets disappear on a 1 line percussion staff #5722

Merged

Conversation

njvdberg
Copy link
Contributor

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

Original code was using the height of the staff to calculate the hight of the
brackets. But for single line staff (percussion instruments!) there is only one
line, resulting in a height of zero, meaning a height of zero.
Now, for single line staves, the height of the barlines is taken. Since barlines
can span several staves in a system the calculation of the barline height has to
implemented in this code itself.
By setting the correct bbox and yOffset for the SysStaff object, this changes will
affect the layout of the system. Compared with version 3.4 all staves of a system
are on exactly the same position.

  • I signed CLA
  • I made sure the code in the PR follows the coding rules
  • I made sure the code compiles on my machine
  • I made sure there are no unnecessary changes in the code
  • I made sure the title of the PR reflects the core meaning of the issue you are solving
  • I made sure the commit message(s) contain a description and answer the question "Why do those changes fix that particular issue?" or "Why are those changes really necessary as improvements?"
  • I made sure the commit message title starts with "fix #424242:" if there is a related issue
  • [n.a.] I created the test (mtest, vtest, script test) to verify the changes I made

libmscore/system.cpp Outdated Show resolved Hide resolved
Original code was using the height of the staff to calculate the hight of the
brackets. But for single line staff (percussion instruments!) there is only one
line, resulting in a height of zero, meaning a height of zero.
Now, for single line staves, the height of the barlines is taken. Since barlines
can span several staves in a system the calculation of the barline height has to
implemented in this code itself.
By setting the correct bbox and yOffset for the SysStaff object, this changes will
affect the layout of the system. Compared with version 3.4 all staves of a system
are on exactly the same position.
@njvdberg njvdberg force-pushed the issue-290409-brackets-disappear branch from c3ca644 to c75b918 Compare February 16, 2020 11:11
@anatoly-os
Copy link
Contributor

@njvdberg would be great to add visual tests for the change. The cases from the related issue can be used. Should you have time, please add ones in a separate PR.

@anatoly-os anatoly-os merged commit ea89c3e into musescore:master Apr 21, 2020
njvdberg added a commit to njvdberg/MuseScore that referenced this pull request Apr 23, 2020
@njvdberg
Copy link
Contributor Author

Sure, no problem, see PR #5983 .

@njvdberg njvdberg deleted the issue-290409-brackets-disappear branch April 23, 2020 13:02
anatoly-os added a commit that referenced this pull request Apr 26, 2020
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.

4 participants