cloneMeasure breaks tuples
Reported version
3.0
Type
Functional
Frequency
Once
Severity
S4 - Minor
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project
measure.cpp cloneMeasure (row 2819 onwards) reads
if (nt == 0) {
nt = new Tuplet(ot);
nt->clear();
nt->setTrack(track);
nt->setScore(sc);
tupletMap.add(ot, nt);
}
its *definitely missing
nt->setParent(m)
.
I discovered this while working on a feature on my own fork that it broke so I am not sure what else it may break, but best to fix it before they are found by users.
Comments
see https://github.com/musescore/MuseScore/pull/4574
It is certainly a good idea to do this. Also, we had better add this line to the same block of code:
But here is the thing. As it stands, Measure::cloneMeasure() is only called by Score::appendScore(), and Score::appendScore() is not called anywhere at all. Score::appendScore() is not to be confused with MuseScore::appendScore(), by the way. So I would not worry about this being found by users. We can fix this now, or margus.niitsoo, you can fix this when you implement your new feature.
Fixed in branch master, commit 41e7b44471
fix #281652: cloneMeasure potentially breaks tuplets
Fixed in branch master, commit 64d700447d
_Merge pull request #4574 from Jojo-Schmitz/clone-measure
fix #281652: cloneMeasure breaks tuplets_
Automatically closed -- issue fixed for 2 weeks with no activity.