Skip to content

Commit

Permalink
Merge pull request #2317 from MarcSabatella/63856-rehearsal-barline
Browse files Browse the repository at this point in the history
fix #63856: don't move rehearsal mark to beginning of system
  • Loading branch information
lasconic committed Feb 18, 2016
2 parents b42621b + 945b838 commit f190d0d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions libmscore/rehearsalmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,18 @@ void RehearsalMark::layout()
Text::layout1();
Segment* s = segment();
if (s && !s->rtick()) {
// rehearsal mark on first chordrest of measure should align over barline
rxpos() -= s->x();
#if 0
// if there is a clef, align right after that instead
Segment* p = segment()->prev(Segment::Type::Clef);
if (p)
rxpos() += p->next()->x();
#endif
// first CR of measure, decide whether to align to barline
if (!s->prev()) {
// measure with no clef / keysig / timesig
rxpos() -= s->x();
}
else if (textStyle().align() & AlignmentFlags::RIGHT) {
// measure with clef / keysig / timesig, rehearsal mark right aligned
// align left edge of rehearsal to barline if that is further to left
qreal leftX = bbox().x();
qreal barlineX = -s->x();
rxpos() += qMin(leftX, barlineX) + width();
}
}
adjustReadPos();
}
Expand Down
Binary file modified vtest/system-3-ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vtest/system-3.mscz
Binary file not shown.

0 comments on commit f190d0d

Please sign in to comment.