Wrong 8va and 8vb end position if preceding a clef change
I attach a score illustrating the bug (MuseScore f5b9240, Xubuntu 14.10).
If 8va and 8vb lines have a end anchor preceding a clef change, the position of this anchor becomes before the anchored note instead of after:
There's no bug if the anchor is put one note before the clef change:
Attachment | Size |
---|---|
8va-and-clef.mscz | 1.47 KB |
8va-and-clef-1.png | 12.6 KB |
8va-and-clef-2.png | 12.6 KB |
Comments
I can reproduce this by simply loading your score, but I can't reproduce it from scratch. It also works if I delete the clef and re-add it. Was this score by chance created in an older build? I think there have been changes since the Beta that could affect this.
If you score was created from scratch in a recent build, could you please list steps to reproduce?
It's created from scratch with MuseScore f5b9240. Steps:
Confirmed. Save / reload seems to be the key.
The bug also occurs with lines 15ma, 15mb, 22ma and 22mb.
The segment width is showing as 0 or otherwise bogus, so that's what is messing things up. In the process of investigating, I found a bunch of other situations where the length of the ottava could be improved - to account for multiple voices, dots, to avoid overlapping a closely-space subsequent note, etc. So I'll be committing a fix for all of these issues.
Maybe you also find the reason for the above/below setting not to work?
That's a different area of the code. But I don't think it was ever intended that there be a way to control whether the line itself appears above or below the staff. Just like for staff text or dynamics or lyrics, there
is only a single style setting to control the vertical position of lines. Someday it would be nice to have "flip" commands for text and lines like we do for articulations, but that's simply not implemented. The above/below you see in the Inspector and in the line properties dialog is not meant to control the *line* position but rather the *text* position within the line. This doesn't work, but that's because the text style vertical alignment settings are conflicting. We should probably eliminate above/below as separate settings here and just let the style setting do its job - if you want text above the line, set the vertical alignment of the text to "align bottom edge".
I should probably comment to this effect in the issue you opened a while back. I wasn't sure then, but looking at the code, I am now.
I'm wrong about above/below for ottavs and updated the other issue. I will look at why this doesn't work in Inspector.
Here's a PR for the bug in this thread, and a number of others that have a similar cause:
https://github.com/musescore/MuseScore/pull/1364
As mentioned above & in the PR, the fix is kind of a workaround. The original code should have worked pretty well, but there seem to be issues with segment bbox calculations. Still, there were some other related issues that I fixed along the way.
I'll do a separate PR for the above/below placement.
New PR:
https://github.com/musescore/MuseScore/pull/1376
What I called a "workaround" turns out to be the better solution anyhow. I also updated a couple other aspects where start or end of ottavas was not as good as it could be. Here is my current vtest:
Fixed in 4868a125e2
Automatically closed -- issue fixed for 2 weeks with no activity.