fix #271053: Drum palette: stem direction incorrect for voice 2 notes

This commit is contained in:
lasconic 2018-04-05 11:44:32 +02:00
parent 1b6e824b44
commit 069c0040e2
2 changed files with 4 additions and 4 deletions

View file

@ -1355,7 +1355,7 @@ qreal Chord::defaultStemLength()
void Chord::layoutStem1()
{
StaffType* st = staff() ? staff()->staffType(tick()) : 0;
if (durationType().hasStem() && !(_noStem || measure()->slashStyle(staffIdx()) || (st && st->isTabStaff() && st->slashStyle()))) {
if (durationType().hasStem() && !(_noStem || (measure() && measure()->slashStyle(staffIdx())) || (st && st->isTabStaff() && st->slashStyle()))) {
if (!_stem) {
Stem* stem = new Stem(score());
stem->setParent(this);
@ -1789,7 +1789,7 @@ void Chord::layoutPitched()
note->setPos(x, y);
}
computeUp();
layoutStem();
layoutStem1();
addLedgerLines();
return;
}

View file

@ -75,8 +75,8 @@ void Stem::layout()
Staff* stf = staff();
if (chord()) {
int tick = chord()->tick();
StaffType* st = stf->staffType(tick);
if (st->isTabStaff() ) { // TAB staves
StaffType* st = stf ? stf->staffType(tick) : nullptr;
if (st && st->isTabStaff() ) { // TAB staves
if (st->stemThrough()) {
// if stems through staves, gets Y pos. of stem-side note relative to chord other side
qreal lineDist = st->lineDistance().val() * spatium();