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 #35176: ottava layout in various special situations #1364

Closed

Conversation

MarcSabatella
Copy link
Contributor

The issue reports one particular case where the endpoint of an ottava line was not calculated well, but in investigation I found a number of others. The code was relying on the width of the segment containing the last chord, and and that probably should work, but there are actually a number of case where the segment width is not set correctly. So instead of using the segment width, I now loop through the chords in the segment myself and find the rightmost point. I left the original code in place (ifdef'ed out) so we can switch back if we fix the segment width issues. But there are a few other small fixes to line layout in this PR we'd want to keep in any case.

@lasconic
Copy link
Contributor

Let's wait for Werner's opinion on http://dev-list.musescore.org/Segments-and-bbox-td7579004.html

@MarcSabatella
Copy link
Contributor Author

That's fine. If we decide it is important to get segment bboxes working
well, this same vtest actually serves as a demonstration of the things that
don't work well now. I tried to make it so we could just flip the #ifdef
in this PR to use segment width rather than the calculation I do now, and
if segment widths are good I think everything should work.

On Sat, Oct 11, 2014 at 8:24 AM, Nicolas Froment notifications@github.com
wrote:

Let's wait for Werner's opinion about
http://dev-list.musescore.org/Segments-and-bbox-td7579004.html


Reply to this email directly or view it on GitHub
#1364 (comment).

Marc Sabatella
marc@outsideshore.com

@MarcSabatella
Copy link
Contributor Author

On further thought, even if segment widths do work, they aren't as good as the code I added for this PR. Using the segment width means placement can be affected by notes in other staves, whereas my code here explicitly checks just the notes in the current staff. Normally it wouldn't matter, but if another staff includes multiple voices and/or dots or other markings that affect segment width, it wouldn't be good to extend the ottava line over them.

So I will update this PR to remove the segment width code and just use the new code. There are a couple of other small tweaks I may want to make as as well, pending discussion on forum: http://musescore.org/en/node/36516#comment-156036.

@MarcSabatella
Copy link
Contributor Author

Updated to remove the code to use segment width. Also a fix to get a better start position for notes with accidentals or other markings to the left of the notehead.

I can't seem to re-open this, maybe because I had rebased. Do I need to submit a new PR, or can someone override?

@MarcSabatella
Copy link
Contributor Author

Seemed just as easy to create a new PR.

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.

None yet

2 participants