Skip to content

Commit

Permalink
fix #68331: line other than ottava should not start at accidental
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcSabatella committed Jul 9, 2015
1 parent 9e4f002 commit b7c9e15
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions libmscore/line.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,14 +472,15 @@ QPointF SLine::linePos(Grip grip, System** sys) const
ChordRest* cr;
if (grip == Grip::START) {
cr = static_cast<ChordRest*>(startElement());
if (cr) {
if (cr && type() == Element::Type::OTTAVA) {
// some sources say to center the text over the note head
// some say to start the text just to left of notehead
// our simple compromise - left align
if (cr->durationType() == TDuration::DurationType::V_MEASURE && type() == Element::Type::OTTAVA)
x = cr->x(); // center for measure rests
// others say to start the text just to left of notehead
// some say to include accidental, others don't
// our compromise - left align, but account for accidental
if (cr->durationType() == TDuration::DurationType::V_MEASURE)
x = cr->x(); // center for measure rests
else if (cr->space().lw() > 0.0)
x = -cr->space().lw(); // account for accidentals, etc
x = -cr->space().lw(); // account for accidentals, etc
}
}
else {
Expand Down
Binary file modified vtest/hairpins-1-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/hairpins-1.mscz
Binary file not shown.

0 comments on commit b7c9e15

Please sign in to comment.