Chord symbol autoplace doesn't work for beamed notes
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.
This is not fixed by the PR to #279391: Text will not go underneath volta.
Attachment | Size |
---|---|
ChordLayout.mscz | 7.03 KB |
Comments
In alpha 2 all is fine... Was introduced after this version.
Still ok in latest beta from 2018-12-07...
Fix typos in the title.
I tried before, but it still looked wierd ;-)
I'm guessing this might be related to #279804: Chord symbol moving unexpectedly. I made some layout changes involving chord symbols, although I didn't think my changes would have caused this. Will look.
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.
https://github.com/musescore/MuseScore/pull/4392
Fixed in branch master, commit aed4c73fbc
fix #279950, fix #279804, fix #279666: force chord symbol layout where needed
Fixed in branch master, commit 2355d2456b
Merge pull request #4392 from MarcSabatella/chord-symbol-forced-layout
fix #279950, fix #279804, fix #279666: force chord symbol layout
Automatically closed -- issue fixed for 2 weeks with no activity.