Skip to content

Commit

Permalink
fix #37571
Browse files Browse the repository at this point in the history
  • Loading branch information
wschweer committed Nov 1, 2014
1 parent 34eee47 commit e5a34fe
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 0 additions & 14 deletions libmscore/chord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -975,20 +975,6 @@ void Chord::write(Xml& xml) const
_tremolo->write(xml);
for (Element* e : _el)
e->write(xml);
for (auto i : score()->spanner()) { // TODO: dont search whole list
Spanner* s = i.second;
if (s->generated() || s->type() != Element::Type::SLUR || !xml.canWrite(s))
continue;

if (s->startElement() == this) {
int id = xml.spannerId(s);
xml.tagE(QString("Slur type=\"start\" id=\"%1\"").arg(id));
}
else if (s->endElement() == this) {
int id = xml.spannerId(s);
xml.tagE(QString("Slur type=\"stop\" id=\"%1\"").arg(id));
}
}
xml.etag();
}

Expand Down
14 changes: 14 additions & 0 deletions libmscore/chordrest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,20 @@ void ChordRest::writeProperties(Xml& xml) const
t *= staff()->timeStretch(xml.curTick);
xml.curTick += t.ticks();
}
for (auto i : score()->spanner()) { // TODO: dont search whole list
Spanner* s = i.second;
if (s->generated() || s->type() != Element::Type::SLUR || !xml.canWrite(s))
continue;

if (s->startElement() == this) {
int id = xml.spannerId(s);
xml.tagE(QString("Slur type=\"start\" id=\"%1\"").arg(id));
}
else if (s->endElement() == this) {
int id = xml.spannerId(s);
xml.tagE(QString("Slur type=\"stop\" id=\"%1\"").arg(id));
}
}
}

//---------------------------------------------------------
Expand Down

0 comments on commit e5a34fe

Please sign in to comment.