Skip to content

Commit

Permalink
beamed grace notes have up stem on default
Browse files Browse the repository at this point in the history
  • Loading branch information
wschweer committed Oct 17, 2012
1 parent ea09483 commit 99155f3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions libmscore/beam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,18 @@ void Beam::layout1()
}
else {
ChordRest* cr = _elements[0];
NoteType noteType = NOTE_NORMAL;
if (cr->type() == CHORD)
noteType = static_cast<Chord*>(cr)->noteType();
else {
for (int i = 1; i < _elements.size(); ++i) {
if (_elements[i]->type() == CHORD) {
noteType = static_cast<Chord*>(_elements[i])->noteType();
break;
}
}
}

Measure* m = cr->measure();
if (m->hasVoices(cr->staffIdx())) {
switch(cr->voice()) {
Expand All @@ -532,6 +544,8 @@ void Beam::layout1()
case 3: _up = (score()->style(ST_stemDir4).toDirection() == MScore::UP); break;
}
}
else if (noteType != NOTE_NORMAL)
_up = true;
else if (!twoBeamedNotes()) {
// highest or lowest note determines stem direction
// down-stems is preferred if equal
Expand Down

0 comments on commit 99155f3

Please sign in to comment.