Skip to content

Commit

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

void TLayout::layout(Arpeggio* item, LayoutContext& ctx)
void TLayout::layout(Arpeggio*, LayoutContext&)
{
v0::LayoutContext ctxv0(ctx.score());
v0::ArpeggioLayout::layout(item, ctxv0);
//! NOTE Moved to PaletteLayout
UNREACHABLE;
}

void TLayout::layout(Articulation*, LayoutContext&)
Expand Down
9 changes: 9 additions & 0 deletions src/palette/internal/palettelayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
#include "engraving/libmscore/utils.h"

#include "engraving/layout/v0/tremololayout.h"
#include "engraving/layout/v0/arpeggiolayout.h"
#include "engraving/layout/pal/tlayout.h"

#include "log.h"
Expand All @@ -104,6 +105,8 @@ void PaletteLayout::layoutItem(EngravingItem* item)
break;
case ElementType::AMBITUS: layout(toAmbitus(item), ctx);
break;
case ElementType::ARPEGGIO: layout(toArpeggio(item), ctx);
break;
case ElementType::ARTICULATION: layout(toArticulation(item), ctx);
break;
case ElementType::BAGPIPE_EMBELLISHMENT: layout(toBagpipeEmbellishment(item), ctx);
Expand Down Expand Up @@ -343,6 +346,12 @@ void PaletteLayout::layout(Ambitus* item, const Context& ctx)
);
}

void PaletteLayout::layout(Arpeggio* item, const Context& ctx)
{
engraving::layout::v0::LayoutContext ctxv0(ctx.donUseScore());
engraving::layout::v0::ArpeggioLayout::layout(item, ctxv0);
}

void PaletteLayout::layout(Articulation* item, const Context&)
{
RectF bbox;
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 @@ -33,6 +33,7 @@ class Score;
class Accidental;
class ActionIcon;
class Ambitus;
class Arpeggio;
class Articulation;

class BagpipeEmbellishment;
Expand Down Expand Up @@ -145,6 +146,7 @@ class PaletteLayout
static void layout(engraving::Accidental* item, const Context& ctx);
static void layout(engraving::ActionIcon* item, const Context& ctx);
static void layout(engraving::Ambitus* item, const Context& ctx);
static void layout(engraving::Arpeggio* item, const Context& ctx);
static void layout(engraving::Articulation* item, const Context& ctx);

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

0 comments on commit 63e57ab

Please sign in to comment.