Wrong 8va and 8vb end position if preceding a clef change

• Oct 3, 2014 - 17:57
Type
Functional
Severity
S4 - Minor
Status
closed
Project

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:

8va-and-clef-1.png

There's no bug if the anchor is put one note before the clef change:

8va-and-clef-2.png

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:

  • Create a new piano score.
  • Enter note input mode and add two half notes in the first measure of the treble clef staff. Exit note input mode.
  • From the palette, drag and drop a treble clef in the second measure of the bass clef staff. For the moment, the result is as follows:

    screenshot-bug-35176.png

  • Save the score, close it and open it again. You see the bug:

    screenshot-bug-35176-2.png

Attachment Size
screenshot-bug-35176.png 9.92 KB
screenshot-bug-35176-2.png 9.82 KB

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.

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.

Status (old) active patch (code needs review)

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.