Tuplet bracket too high for unbeamed eighths

• Feb 1, 2015 - 21:54
Type
Functional
Severity
S4 - Minor
Status
closed
Project

Ubuntu 14.04, GIT commit: 0dfcac4

1) new score, 4/4
2) note entry mode
3) 6, Ctrl+5, 0 B 0 A 0

Result: tuplet bracket is way too far above staff

high-tuplet.png

I can reproduce similar cases many other ways. Investigating the cause for this, it appears the chord bboxes are sometimes way off, and this is fooling the code that detects collisions within the tuplet. In this case, it seems to be the B whose bbox is entirely too tall (and also shifted to the right?). I have unfortunately noticed bad chord bboxes before and either worked around it or lived with it, on the basis of the principle that only elements that are actually drawn should be expected to have reasonable bboxes.

But there are places in the code where we either do or should/code rely on chord bboxes, and this appears to be an especially bad consequence of them not being good. I looked at the code that calculates the chord bbox at the bottom of Chord::layoutPitched() using processSiblings(), but I don't know what the problem is - whether one of the siblings is bad or the method of accumulating the results is or what.

Meanwhile, I can again work around this by changing the collision detection code to use upNote() or downNote() bbox instead of the chord bbox. But at some point, we should consider looking at the chord bbox code.


Comments