Skip to content
Permalink
Browse files

fix #95366 - [MusicXML export] end repeat missing in multi-measure rest

  • Loading branch information...
lvinken committed Jan 31, 2016
1 parent a20f4bf commit a757407dc444e2ddc20f89d24958cf3794464601
Showing with 82 additions and 2 deletions.
  1. +4 −1 mscore/exportxml.cpp
  2. +77 −0 mtest/musicxml/io/testMultiMeasureRest2_ref.xml
  3. +1 −1 mtest/musicxml/io/tst_mxml_io.cpp
@@ -1444,7 +1444,10 @@ void ExportMusicXml::barlineLeft(Measure* m)

void ExportMusicXml::barlineRight(Measure* m)
{
BarLineType bst = m->endBarLineType();
const Measure* mmR1 = m->mmRest1(); // the multi measure rest this measure is covered by
const Measure* mmRLst = mmR1->isMMRest() ? mmR1->mmRestLast() : 0; // last measure of replaced sequence of empty measures
// note: use barlinetype as found in multi measure rest for last measure of replaced sequence
BarLineType bst = m == mmRLst ? mmR1->endBarLineType() : m->endBarLineType();
bool visible = m->endBarLineVisible();
bool needBarStyle = (bst != BarLineType::NORMAL && bst != BarLineType::START_REPEAT) || !visible;
Volta* volta = findVolta(m, false);
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.0 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd">
<score-partwise>
<work>
<work-number>MuseScore testfile</work-number>
<work-title>Multi-Measure Rests 2</work-title>
</work>
<identification>
<creator type="composer">Leon Vinken</creator>
<encoding>
<software>MuseScore 0.7.0</software>
<encoding-date>2007-09-10</encoding-date>
<supports element="accidental" type="yes"/>
<supports element="beam" type="yes"/>
<supports element="print" attribute="new-page" type="no"/>
<supports element="print" attribute="new-system" type="no"/>
<supports element="stem" type="yes"/>
</encoding>
</identification>
<part-list>
<score-part id="P1">
<part-name>Piano</part-name>
<part-abbreviation>Pno.</part-abbreviation>
<score-instrument id="P1-I1">
<instrument-name>Piano</instrument-name>
</score-instrument>
<midi-device id="P1-I1" port="1"></midi-device>
<midi-instrument id="P1-I1">
<midi-channel>1</midi-channel>
<midi-program>1</midi-program>
<volume>78.7402</volume>
<pan>0</pan>
</midi-instrument>
</score-part>
</part-list>
<part id="P1">
<measure number="1">
<barline location="left">
<bar-style>heavy-light</bar-style>
<repeat direction="forward"/>
</barline>
<attributes>
<divisions>1</divisions>
<key>
<fifths>1</fifths>
</key>
<time>
<beats>3</beats>
<beat-type>4</beat-type>
</time>
<clef>
<sign>G</sign>
<line>2</line>
</clef>
<measure-style>
<multiple-rest>2</multiple-rest>
</measure-style>
</attributes>
<note>
<rest/>
<duration>3</duration>
<voice>1</voice>
</note>
</measure>
<measure number="2">
<note>
<rest/>
<duration>3</duration>
<voice>1</voice>
</note>
<barline location="right">
<bar-style>light-heavy</bar-style>
<repeat direction="backward"/>
</barline>
</measure>
</part>
</score-partwise>
@@ -109,7 +109,7 @@ private slots:
void multiInstrumentPart1() { mxmlIoTest("testMultiInstrumentPart1"); }
//void multiInstrumentPart2() { mxmlIoTest("testMultiInstrumentPart2"); } must also fix exportxml.cpp
void multiMeasureRest1() { mxmlIoTestRef("testMultiMeasureRest1"); }
//void multiMeasureRest2() { mxmlIoTestRef("testMultiMeasureRest2"); } end repeat missing
void multiMeasureRest2() { mxmlIoTestRef("testMultiMeasureRest2"); }
void multiMeasureRest3() { mxmlIoTestRef("testMultiMeasureRest3"); }
void multipleNotations() { mxmlIoTestRef("testMultipleNotations"); }
void nonStandardKeySig1() { mxmlIoTest("testNonStandardKeySig1"); }

0 comments on commit a757407

Please sign in to comment.
You can’t perform that action at this time.