Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions src/engraving/rendering/score/chordlayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,6 @@ void ChordLayout::layoutPitched(Chord* item, LayoutContext& ctx)
}
}

for (EngravingItem* e : item->el()) {
if (e->isChordBracket()) {
TLayout::layoutItem(e, ctx);
}
}

// A chord can have its own arpeggio and also be part of another arpeggio's span. We need to lay out both of these arpeggios properly
Arpeggio* oldSpanArp = item->spanArpeggio();
Arpeggio* newSpanArp = nullptr;
Expand Down Expand Up @@ -296,7 +290,9 @@ void ChordLayout::layoutPitched(Chord* item, LayoutContext& ctx)
}

for (EngravingItem* e : item->el()) {
if (e->isSlur()) { // we cannot at this time as chordpositions are not fixed
// Cannot layout slurs as chord positions are not fixed
// Chord brackets should be the outermost element
if (e->isSlur() || e->isChordBracket()) {
continue;
}
TLayout::layoutItem(e, ctx);
Expand Down Expand Up @@ -341,6 +337,12 @@ void ChordLayout::layoutPitched(Chord* item, LayoutContext& ctx)
createParenGroups(item);
ParenthesisLayout::layoutChordParentheses(item, ctx);

for (EngravingItem* e : item->el()) {
if (e->isChordBracket()) {
TLayout::layoutItem(e, ctx);
}
}

fillShape(item, item->mutldata(), ctx.conf());
}

Expand Down
4 changes: 3 additions & 1 deletion src/engraving/rendering/score/parenthesislayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,9 @@ Shape ParenthesisLayout::getParentShape(const EngravingItem* parent)
return !s.item() || s.item()->isParenthesis()
|| (s.item()->isLaissezVibSegment() && isChord)
|| (s.item()->isHook() && isChord)
|| (s.item()->isStem() && isChord);
|| (s.item()->isStem() && isChord)
|| (s.item()->isArpeggio() && isChord)
|| (s.item()->isChordBracket() && isChord);
});

return parentShape;
Expand Down
Binary file added vtest/scores/chordBrackets-3.mscz
Binary file not shown.
Loading