Skip to content

Commit

Permalink
Fix musescore#16878: Enforce same lyric alignment stem flip
Browse files Browse the repository at this point in the history
  • Loading branch information
MengLinMaker committed May 16, 2023
1 parent ba4ebb8 commit 180534d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/engraving/layout/lyricslayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,10 @@ void LyricsLayout::layout(Lyrics* item, LayoutContext&)
}

PointF o(item->propertyDefault(Pid::OFFSET).value<PointF>());
item->setPosX(o.x());
double x = item->pos().x();

// Negate ChordRest offset
double x = o.x() - cr->x();

item->TextBase::layout1();

double centerAdjust = 0.0;
Expand Down Expand Up @@ -200,7 +202,7 @@ void LyricsLayout::layout(Lyrics* item, LayoutContext&)
//
// center under note head
double nominalWidth = item->symWidth(SymId::noteheadBlack);
x += nominalWidth * .5 - cr->x() - centerAdjust * 0.5;
x += nominalWidth * .5 - centerAdjust * 0.5;
} else if (!(item->align() == AlignH::RIGHT)) {
// even for left aligned syllables, ignore leading verse numbers and/or punctuation
x -= leftAdjust;
Expand Down

0 comments on commit 180534d

Please sign in to comment.