Skip to content

Commit

Permalink
[palette] added layout for LayoutBreak
Browse files Browse the repository at this point in the history
  • Loading branch information
igorkorsukov committed Jul 10, 2023
1 parent 9ab5c76 commit 6d0371c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/engraving/layout/pal/tlayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1208,9 +1208,10 @@ void TLayout::layout(KeySig*, LayoutContext&)
UNREACHABLE;
}

void TLayout::layout(LayoutBreak* item, LayoutContext&)
void TLayout::layout(LayoutBreak*, LayoutContext&)
{
UNUSED(item);
//! NOTE Moved to PaletteLayout
UNREACHABLE;
}

void TLayout::layout(LedgerLine* item, LayoutContext& ctx)
Expand Down
7 changes: 7 additions & 0 deletions src/palette/internal/palettelayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ void PaletteLayout::layoutItem(EngravingItem* item)
break;
case ElementType::KEYSIG: layout(toKeySig(item), ctx);
break;
case ElementType::LAYOUT_BREAK: layout(toLayoutBreak(item), ctx);
break;
case ElementType::LET_RING: layout(toLetRing(item), ctx);
break;
case ElementType::MARKER: layout(toMarker(item), ctx);
Expand Down Expand Up @@ -1061,6 +1063,11 @@ void PaletteLayout::layout(KeySig* item, const Context& ctx)
}
}

void PaletteLayout::layout(LayoutBreak* item, const Context&)
{
UNUSED(item);
}

void PaletteLayout::layout(LetRing* item, const Context& ctx)
{
layoutLine(item, ctx);
Expand Down
2 changes: 2 additions & 0 deletions src/palette/internal/palettelayout.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class Jump;

class KeySig;

class LayoutBreak;
class LetRing;
class LetRingSegment;
class SLine;
Expand Down Expand Up @@ -171,6 +172,7 @@ class PaletteLayout

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

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

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

0 comments on commit 6d0371c

Please sign in to comment.