Skip to content

Commit

Permalink
fix #36761: horizontal position of multivoice articulations
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcSabatella committed Oct 15, 2014
1 parent 1349587 commit 874c053
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
12 changes: 7 additions & 5 deletions libmscore/chord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2577,8 +2577,6 @@ QPointF Chord::layoutArticulation(Articulation* a)
line = ((line-add) & ~1) + 3 + add*2;
else // if note on or below staff bottom line,
line += 2 + add; // move 1 whole space below
if (!staff()->isTabStaff()) // on pitched staves, note is at left of stem:
pos.rx() -= upNote()->headWidth() * .5; // move half-a-note-head to left
pos.ry() = -a->height() / 2; // symbol is below baseline, shift if a bit up
}
else { // if above chord
Expand All @@ -2588,11 +2586,15 @@ QPointF Chord::layoutArticulation(Articulation* a)
line = ((line+1+add) & ~1) - 3 - add*2;
else // if note or or above staff top line
line -= 2 + add; // move 1 whole space above
if (!staff()->isTabStaff()) // on pitched staves, note is at right of stem:
pos.rx() += upNote()->headWidth() * .5; // move half-a-note-head to right
pos.ry() = a->height() / 2; // symbol is on baseline, shift it a bit down
}
pos.ry() += line * _spStaff2; // convert staff position to sp distance
pos.ry() += line * _spStaff2; // convert staff position to sp distance
}
if (!staff()->isTabStaff()) {
if (up())
pos.rx() -= upNote()->headWidth() * .5; // move half-a-note-head to left
else
pos.rx() += upNote()->headWidth() * .5; // move half-a-note-head to right
}
a->setPos(pos);
a->adjustReadPos();
Expand Down
2 changes: 1 addition & 1 deletion vtest/gen
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ else
accidental-6 accidental-7 accidental-8 accidental-9\
tie-1 tie-2 grace-1 grace-2 grace-3 harmony-1 harmony-2 harmony-3 harmony-4 beams-1 beams-2\
user-offset-1 user-offset-2 chord-space-1 tablature-1 image-1\
lyrics-1 lyrics-2"
lyrics-1 lyrics-2 voice-1"
fi

DPI=130
Expand Down
2 changes: 1 addition & 1 deletion vtest/gen.bat
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ set SRC=mmrest-1,bravura-mmrest,gonville-mmrest,mmrest-2,mmrest-4,mmrest-5,mmres
accidental-6,accidental-7,accidental-8,accidental-9, ^
tie-1,tie-2,grace-1,grace-2,grace-3,harmony-1,harmony-2,harmony-3,harmony-4,beams-1,beams-2, ^
user-offset-1,user-offset-2,chord-space-1,tablature-1,image-1, ^
lyrics-1,lyrics-2
lyrics-1,lyrics-2,voice-1

set MSCORE=..\win32install\bin\mscore.exe
set DPI=130
Expand Down
Binary file added vtest/voice-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 added vtest/voice-1.mscz
Binary file not shown.

0 comments on commit 874c053

Please sign in to comment.