Skip to content

Commit

Permalink
fix #125881 - [MusicXML Export] invalid MusicXML when too many overla…
Browse files Browse the repository at this point in the history
…pping hairpins are present
  • Loading branch information
lvinken committed Oct 9, 2016
1 parent 423a066 commit 138c700
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions mscore/exportxml.cpp
Expand Up @@ -3270,17 +3270,22 @@ int ExportMusicXml::findHairpin(const Hairpin* hp) const

void ExportMusicXml::hairpin(Hairpin const* const hp, int staff, int tick)
{
directionTag(xml, attr, hp);
xml.stag("direction-type");

int n = findHairpin(hp);
if (n >= 0)
hairpins[n] = 0;
else {
n = findHairpin(0);
hairpins[n] = hp;
if (n >= 0)
hairpins[n] = hp;
else {
qDebug("too many overlapping hairpins (hp %p staff %d tick %d)", hp, staff, tick);
return;
}
}

directionTag(xml, attr, hp);
xml.stag("direction-type");

if (hp->tick() == tick) {
if ( hp->hairpinType() == HairpinType::CRESC_HAIRPIN ) {
if ( hp->hairpinCircledTip() ) {
Expand Down

0 comments on commit 138c700

Please sign in to comment.