Merge pull request #19745 from miiizen/cross-staff-direction

Relayout chord when direction changes
This commit is contained in:
Casper Jeukendrup 2023-10-19 13:55:26 +02:00 committed by GitHub
commit 954e245438
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1326,7 +1326,13 @@ void MeasureLayout::layoutCrossStaff(MeasureBase* mb, LayoutContext& ctx)
Tremolo* tremolo = c->tremolo();
if ((beam && (beam->cross() || beam->userModified()))
|| (tremolo && tremolo->twoNotes() && tremolo->userModified())) {
bool prevUp = c->up();
ChordLayout::computeUp(c, ctx); // for cross-staff beams
if (c->up() != prevUp) {
// Chord has changed direction, lay out again
ChordLayout::layoutChords1(ctx, &s, c->vStaffIdx());
s.createShape(c->vStaffIdx());
}
}
if (!c->graceNotes().empty()) {
for (Chord* grace : c->graceNotes()) {