Skip to content

Commit

Permalink
fix #40036: Tremolo through stem on grace note all eighths in 1.3 score
Browse files Browse the repository at this point in the history
  • Loading branch information
lasconic committed Nov 28, 2014
1 parent 05939ea commit c61c9ae
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
2 changes: 1 addition & 1 deletion libmscore/layout.cpp
Expand Up @@ -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
Expand Down
36 changes: 20 additions & 16 deletions libmscore/measure.cpp
Expand Up @@ -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 {
Expand All @@ -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;
Expand Down Expand Up @@ -1914,9 +1921,6 @@ void Measure::read(XmlReader& e, int staffIdx)
}
crticks /= 2;
}
else {
tremolo->setParent(chord);
}
}
lastTick = e.tick();
e.incTick(crticks);
Expand Down

0 comments on commit c61c9ae

Please sign in to comment.