Chord symbols attached to fret diagrams don't link to parts

• May 20, 2020 - 22:29
Reported version
3.4
Priority
P1 - High
Type
Functional
Frequency
Once
Severity
S3 - Major
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project

A few related aspects to this:

1) default empty score
2) add C major fret diagram from palette to bar 1
3) generate parts
4) view part
5) click the chord symbol "C" attached to fret diagram

Result: scoreview instant;y throws you back to the parent score. That is, I think, because the "score" pointer for the chord symbol is that of the parent score rather than the part - it was never set correctly on add.

Now:

4) in score, edit chord symbol to read D instead of C
5) view part

Result: it still reads "C", because there is no link between the chord symbols. And if there was, there would be a crash on processing the transposition, because there is a bad assumption that parent() is a segment in that the endEdit() code. Although my PR https://github.com/musescore/MuseScore/pull/6104 fixes the crash. That's how I discovered the problems here - I was fixing another crash involving a bad assumption of parentage, looked for other code that might make the same mistake, found the line in endEdit, tried to trigger it to crash, then wondered why I couldn't. That's when I realize the links simply don't exist.

Now,

1) add a new fret diagram to the score and repeat these steps for it

Result: same deal. I mention this only because these cases will likely need to be fixed separately (in same PR, but separate parts of the code). One will be when creating the excerpt, the other will be on adding elements.


Comments

Status PR created fixed

Fixed in branch 3.x, commit e146e6a6a2

_fix #305717: chord symbols attached to fret diagrams don't link to parts

This issue mainly comes from a linked version of the harmony not being created when a linked version of a fret
diagram is created. To fix this, a few bits of special case logic, plus the implementation of this linked child harmony,
needed to be added._

Fix version
3.5.0