Skip to content

Commit 6d0371c

Browse files
committed
[palette] added layout for LayoutBreak
1 parent 9ab5c76 commit 6d0371c

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

src/engraving/layout/pal/tlayout.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,9 +1208,10 @@ void TLayout::layout(KeySig*, LayoutContext&)
12081208
UNREACHABLE;
12091209
}
12101210

1211-
void TLayout::layout(LayoutBreak* item, LayoutContext&)
1211+
void TLayout::layout(LayoutBreak*, LayoutContext&)
12121212
{
1213-
UNUSED(item);
1213+
//! NOTE Moved to PaletteLayout
1214+
UNREACHABLE;
12141215
}
12151216

12161217
void TLayout::layout(LedgerLine* item, LayoutContext& ctx)

src/palette/internal/palettelayout.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ void PaletteLayout::layoutItem(EngravingItem* item)
145145
break;
146146
case ElementType::KEYSIG: layout(toKeySig(item), ctx);
147147
break;
148+
case ElementType::LAYOUT_BREAK: layout(toLayoutBreak(item), ctx);
149+
break;
148150
case ElementType::LET_RING: layout(toLetRing(item), ctx);
149151
break;
150152
case ElementType::MARKER: layout(toMarker(item), ctx);
@@ -1061,6 +1063,11 @@ void PaletteLayout::layout(KeySig* item, const Context& ctx)
10611063
}
10621064
}
10631065

1066+
void PaletteLayout::layout(LayoutBreak* item, const Context&)
1067+
{
1068+
UNUSED(item);
1069+
}
1070+
10641071
void PaletteLayout::layout(LetRing* item, const Context& ctx)
10651072
{
10661073
layoutLine(item, ctx);

src/palette/internal/palettelayout.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ class Jump;
6868

6969
class KeySig;
7070

71+
class LayoutBreak;
7172
class LetRing;
7273
class LetRingSegment;
7374
class SLine;
@@ -171,6 +172,7 @@ class PaletteLayout
171172

172173
static void layout(engraving::KeySig* item, const Context& ctx);
173174

175+
static void layout(engraving::LayoutBreak* item, const Context& ctx);
174176
static void layout(engraving::LetRing* item, const Context& ctx);
175177

176178
static void layout(engraving::NoteHead* item, const Context& ctx);

0 commit comments

Comments
 (0)