Skip to content

Commit

Permalink
fix #142116: order of ending/repeat in MusicXML
Browse files Browse the repository at this point in the history
  • Loading branch information
lasconic committed Nov 24, 2016
1 parent b100821 commit 63f5d73
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
20 changes: 11 additions & 9 deletions mscore/exportxml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1433,13 +1433,12 @@ void ExportMusicXml::barlineLeft(Measure* m)
if (!rs && !volta) return;
attr.doAttr(xml, false);
xml.stag(QString("barline location=\"left\""));
if (rs) {
if (rs)
xml.tag("bar-style", QString("heavy-light"));
xml.tagE("repeat direction=\"forward\"");
}
if (volta) {
if (volta)
ending(xml, volta, true);
}
if (rs)
xml.tagE("repeat direction=\"forward\"");
xml.etag();
}

Expand Down Expand Up @@ -4608,12 +4607,15 @@ void ExportMusicXml::findAndExportClef(Measure* m, const int staves, const int s
Segment* seg = 0;

if (prevMeasure)
cs1 = prevMeasure->findSegment(Segment::Type::Clef, tick);
cs1 = prevMeasure->findSegment(Segment::Type::Clef, tick);
else
cs1 = 0;
cs1 = m->findSegment(Segment::Type::HeaderClef, tick);

if (mmR)
cs3 = mmR->findSegment(Segment::Type::Clef, tick);
if (mmR) {
cs3 = mmR->findSegment(Segment::Type::HeaderClef, tick);
if (!cs3)
cs3 = mmR->findSegment(Segment::Type::Clef, tick);
}
else
cs3 = 0;

Expand Down
2 changes: 1 addition & 1 deletion mtest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ subdirs (
importmidi
capella
biab
# musicxml
musicxml
guitarpro
scripting
testoves
Expand Down
2 changes: 1 addition & 1 deletion mtest/musicxml/io/testNoteheads.xml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
<voice>1</voice>
<type>quarter</type>
<stem>up</stem>
<notehead>fa</notehead>
<notehead>fa up</notehead>
</note>
<note>
<pitch>
Expand Down

0 comments on commit 63f5d73

Please sign in to comment.