fix #40036: Tremolo through stem on grace note all eighths in 1.3 score

This commit is contained in:
lasconic 2014-11-28 19:56:09 +01:00
parent 05939ea41d
commit c61c9aee68
2 changed files with 21 additions and 17 deletions

View file

@ -3042,7 +3042,7 @@ void Score::layoutLinear()
}
Measure* m = static_cast<Measure*>(mb);
Measure* nm = m->nextMeasure();
if (m->repeatFlags() & Repeat::END) {
if (m->repeatFlags() & Repeat::END) {
if (nm && (nm->repeatFlags() & Repeat::START))
m->setEndBarLineType(BarLineType::END_START_REPEAT, m->endBarLineGenerated());
else

View file

@ -1854,6 +1854,26 @@ void Measure::read(XmlReader& e, int staffIdx)
chord->read(e);
segment = getSegment(Segment::Type::ChordRest, e.tick());
if (chord->tremolo() && chord->tremolo()->tremoloType() < TremoloType::R8) {
//
// old style tremolo found
//
Tremolo* tremolo = chord->tremolo();
TremoloType st;
switch (tremolo->tremoloType()) {
default:
case TremoloType::OLD_R8: st = TremoloType::R8; break;
case TremoloType::OLD_R16: st = TremoloType::R16; break;
case TremoloType::OLD_R32: st = TremoloType::R32; break;
case TremoloType::OLD_C8: st = TremoloType::C8; break;
case TremoloType::OLD_C16: st = TremoloType::C16; break;
case TremoloType::OLD_C32: st = TremoloType::C32; break;
}
tremolo->setTremoloType(st);
if (!tremolo->twoNotes())
tremolo->setParent(chord);
}
if (chord->noteType() != NoteType::NORMAL)
graceNotes.push_back(chord);
else {
@ -1869,21 +1889,8 @@ void Measure::read(XmlReader& e, int staffIdx)
int crticks = chord->actualTicks();
if (chord->tremolo() && chord->tremolo()->tremoloType() < TremoloType::R8) {
//
// old style tremolo found
//
Tremolo* tremolo = chord->tremolo();
TremoloType st;
switch (tremolo->tremoloType()) {
default:
case TremoloType::OLD_R8: st = TremoloType::R8; break;
case TremoloType::OLD_R16: st = TremoloType::R16; break;
case TremoloType::OLD_R32: st = TremoloType::R32; break;
case TremoloType::OLD_C8: st = TremoloType::C8; break;
case TremoloType::OLD_C16: st = TremoloType::C16; break;
case TremoloType::OLD_C32: st = TremoloType::C32; break;
}
tremolo->setTremoloType(st);
if (tremolo->twoNotes()) {
int track = chord->track();
Segment* ss = 0;
@ -1914,9 +1921,6 @@ void Measure::read(XmlReader& e, int staffIdx)
}
crticks /= 2;
}
else {
tremolo->setParent(chord);
}
}
lastTick = e.tick();
e.incTick(crticks);