Chord symbol autoplace doesn't work for beamed notes

• Dec 13, 2018 - 11:25
Reported version
3.0
Priority
P0 - Critical
Type
Functional
Frequency
Once
Severity
S3 - Major
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
No
Project

Seen in version: OS: Windows 7 SP 1 (6.1), Arch.: x86_64, MuseScore version (64-bit): 3.0.0.4468, revision: 16c56ff

When chord symbols are above 8th notes (or shorter) they don't respect other elements in automatic layout. In the attached example, the ignore both fret diagram and volta. If we have a 16th followed by a break, all is fine.

ChordLayout.png

This is not fixed by the PR to #279391: Text will not go underneath volta.

Attachment Size
ChordLayout.mscz 7.03 KB

Comments

Title Layout of chord symbols weird Chord symbol autoplace doesn't work for beamed notes
Priority P1 - High P0 - Critical

The basic problem is similar in principle, different in specifics: Harmony::layout() calculates a basic position during initial layout without considering autoplace, and if layout is ever called after autoplace has done its work, the autoplace position is undone.

In the case of clicking a rest as in the other issue, autoplace did its job the last full layout, but we get a partial layout of just this rest on click and that lays out the chord symbol but never does enough of a full layout to trigger autoplace to finish the job.

In the case at hand, we do the initial layout and autoplace just fine, but there is then a separate pass made for the beams, and this triggers a layout of the first chord on the beam, which again clobbers the autoplace.

Chance are there other places in the code where we trigger a re-layout of the chord symbol without doing a full relayout. For instance, trying to edit an autoplaced chord symbol causes it to jump back down (and it stays down until next relayout if you don't make a change). This doesn't happen for other text elements.

Harmony layout is special in several ways (the need to transpose, parse and render the text, etc), but hopefully I can fix this without breaking other things.