fix #105641 no initial clef
Make sure to test initialClef is non-null before trying to dereference.
This commit is contained in:
parent
6f05b53968
commit
204b0ec91a
7 changed files with 805 additions and 15 deletions
|
@ -1767,26 +1767,30 @@ void Score::removeAudio()
|
|||
|
||||
bool Score::appendScore(Score* score, bool addPageBreak, bool addSectionBreak)
|
||||
{
|
||||
if (parts().size() < score->parts().size() || staves().size() < score->staves().size())
|
||||
if (parts().size() < score->parts().size() || staves().size() < score->staves().size()) {
|
||||
qDebug("Score to append has %d parts and %d staves, but this score only has %d parts and %d staves.", score->parts().size(), score->staves().size(), parts().size(), staves().size());
|
||||
return false;
|
||||
TieMap tieMap;
|
||||
}
|
||||
|
||||
MeasureBase* lastMeasure = last();
|
||||
if (!lastMeasure)
|
||||
if (!last()) {
|
||||
qDebug("This score doesn't have any MeasureBase objects.");
|
||||
return false;
|
||||
int tickOfAppend = lastMeasure->endTick();
|
||||
}
|
||||
|
||||
TieMap tieMap;
|
||||
int tickOfAppend = last()->endTick();
|
||||
|
||||
// apply Page/Section Breaks if desired
|
||||
if (addPageBreak) {
|
||||
if (!lastMeasure->pageBreak()) {
|
||||
lastMeasure->undoSetBreak(false, LayoutBreak::Type::LINE); // remove line break if exists
|
||||
lastMeasure->undoSetBreak(true, LayoutBreak::Type::PAGE); // apply page break
|
||||
if (!last()->pageBreak()) {
|
||||
last()->undoSetBreak(false, LayoutBreak::Type::LINE); // remove line break if exists
|
||||
last()->undoSetBreak(true, LayoutBreak::Type::PAGE); // apply page break
|
||||
}
|
||||
}
|
||||
else if (!lastMeasure->lineBreak() && !lastMeasure->pageBreak())
|
||||
lastMeasure->undoSetBreak(true, LayoutBreak::Type::LINE);
|
||||
if (addSectionBreak && !lastMeasure->sectionBreak())
|
||||
lastMeasure->undoSetBreak(true, LayoutBreak::Type::SECTION);
|
||||
else if (!last()->lineBreak() && !last()->pageBreak())
|
||||
last()->undoSetBreak(true, LayoutBreak::Type::LINE);
|
||||
if (addSectionBreak && !last()->sectionBreak())
|
||||
last()->undoSetBreak(true, LayoutBreak::Type::SECTION);
|
||||
|
||||
// match concert pitch states
|
||||
if (styleB(StyleIdx::concertPitch) != score->styleB(StyleIdx::concertPitch))
|
||||
|
@ -1803,7 +1807,7 @@ bool Score::appendScore(Score* score, bool addPageBreak, bool addSectionBreak)
|
|||
|
||||
// if the first clef of score to append is generated and
|
||||
// if the first clef of score to append is of different type than clef at final tick of first score
|
||||
if (initialClef->generated() && initialClef->clefType() != this->staff(staffIdx)->clef(tickOfAppend)) {
|
||||
if (initialClef && initialClef->generated() && initialClef->clefType() != this->staff(staffIdx)->clef(tickOfAppend)) {
|
||||
|
||||
// then convert that generated clef into a real non-generated clef so that its different type will be copied to joined score
|
||||
score->undoChangeClef(staff, initialClefSegment, initialClef->clefType());
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<museScore version="2.00">
|
||||
<museScore version="2.06">
|
||||
<Score>
|
||||
<LayerTag id="0" tag="default"></LayerTag>
|
||||
<currentLayer>0</currentLayer>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<museScore version="2.00">
|
||||
<museScore version="2.06">
|
||||
<Score>
|
||||
<LayerTag id="0" tag="default"></LayerTag>
|
||||
<currentLayer>0</currentLayer>
|
||||
|
|
203
mtest/libmscore/album/album_105641-no-initial-clef-01.mscx
Normal file
203
mtest/libmscore/album/album_105641-no-initial-clef-01.mscx
Normal file
|
@ -0,0 +1,203 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<museScore version="2.06">
|
||||
<Score>
|
||||
<LayerTag id="0" tag="default"></LayerTag>
|
||||
<currentLayer>0</currentLayer>
|
||||
<Division>480</Division>
|
||||
<Style>
|
||||
<lastSystemFillLimit>0</lastSystemFillLimit>
|
||||
<page-layout>
|
||||
<page-height>1683.36</page-height>
|
||||
<page-width>1190.88</page-width>
|
||||
<page-margins type="even">
|
||||
<left-margin>56.6929</left-margin>
|
||||
<right-margin>56.6929</right-margin>
|
||||
<top-margin>56.6929</top-margin>
|
||||
<bottom-margin>113.386</bottom-margin>
|
||||
</page-margins>
|
||||
<page-margins type="odd">
|
||||
<left-margin>56.6929</left-margin>
|
||||
<right-margin>56.6929</right-margin>
|
||||
<top-margin>56.6929</top-margin>
|
||||
<bottom-margin>113.386</bottom-margin>
|
||||
</page-margins>
|
||||
</page-layout>
|
||||
<Spatium>1.76389</Spatium>
|
||||
</Style>
|
||||
<showInvisible>1</showInvisible>
|
||||
<showUnprintable>1</showUnprintable>
|
||||
<showFrames>1</showFrames>
|
||||
<showMargins>0</showMargins>
|
||||
<metaTag name="arranger"></metaTag>
|
||||
<metaTag name="composer">Composer</metaTag>
|
||||
<metaTag name="copyright"></metaTag>
|
||||
<metaTag name="lyricist"></metaTag>
|
||||
<metaTag name="movementNumber"></metaTag>
|
||||
<metaTag name="movementTitle"></metaTag>
|
||||
<metaTag name="poet"></metaTag>
|
||||
<metaTag name="source"></metaTag>
|
||||
<metaTag name="translator"></metaTag>
|
||||
<metaTag name="workNumber"></metaTag>
|
||||
<metaTag name="workTitle">Title</metaTag>
|
||||
<PageList>
|
||||
<Page>
|
||||
<System>
|
||||
</System>
|
||||
</Page>
|
||||
</PageList>
|
||||
<Part>
|
||||
<Staff id="1">
|
||||
<StaffType group="pitched">
|
||||
<name>stdNormal</name>
|
||||
</StaffType>
|
||||
</Staff>
|
||||
<trackName>Piano</trackName>
|
||||
<Instrument>
|
||||
<shortName>Pno.</shortName>
|
||||
<trackName>Piano</trackName>
|
||||
<minPitchP>21</minPitchP>
|
||||
<maxPitchP>108</maxPitchP>
|
||||
<minPitchA>21</minPitchA>
|
||||
<maxPitchA>108</maxPitchA>
|
||||
<clef staff="2">F</clef>
|
||||
<Articulation>
|
||||
<velocity>100</velocity>
|
||||
<gateTime>95</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="staccatissimo">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>33</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="staccato">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>50</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="portato">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>67</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="tenuto">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>100</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="marcato">
|
||||
<velocity>120</velocity>
|
||||
<gateTime>67</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="sforzato">
|
||||
<velocity>120</velocity>
|
||||
<gateTime>100</gateTime>
|
||||
</Articulation>
|
||||
<Channel>
|
||||
<program value="0"/>
|
||||
</Channel>
|
||||
</Instrument>
|
||||
</Part>
|
||||
<Part>
|
||||
<Staff id="2">
|
||||
<StaffType group="pitched">
|
||||
<name>stdNormal</name>
|
||||
</StaffType>
|
||||
</Staff>
|
||||
<Staff id="3">
|
||||
<StaffType group="pitched">
|
||||
<name>stdNormal</name>
|
||||
</StaffType>
|
||||
<defaultClef>F</defaultClef>
|
||||
</Staff>
|
||||
<trackName>Piano</trackName>
|
||||
<Instrument>
|
||||
<shortName>Pno.</shortName>
|
||||
<trackName>Piano</trackName>
|
||||
<minPitchP>21</minPitchP>
|
||||
<maxPitchP>108</maxPitchP>
|
||||
<minPitchA>21</minPitchA>
|
||||
<maxPitchA>108</maxPitchA>
|
||||
<instrumentId>keyboard.piano</instrumentId>
|
||||
<clef staff="2">F</clef>
|
||||
<Articulation>
|
||||
<velocity>100</velocity>
|
||||
<gateTime>95</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="staccatissimo">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>33</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="staccato">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>50</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="portato">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>67</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="tenuto">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>100</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="marcato">
|
||||
<velocity>120</velocity>
|
||||
<gateTime>67</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="sforzato">
|
||||
<velocity>120</velocity>
|
||||
<gateTime>100</gateTime>
|
||||
</Articulation>
|
||||
<Channel>
|
||||
<program value="0"/>
|
||||
</Channel>
|
||||
</Instrument>
|
||||
</Part>
|
||||
<Staff id="1">
|
||||
<Measure number="1">
|
||||
<TimeSig>
|
||||
<sigN>4</sigN>
|
||||
<sigD>4</sigD>
|
||||
<showCourtesySig>1</showCourtesySig>
|
||||
</TimeSig>
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration z="4" n="4"/>
|
||||
</Rest>
|
||||
<BarLine>
|
||||
<subtype>end</subtype>
|
||||
<span>1</span>
|
||||
</BarLine>
|
||||
</Measure>
|
||||
</Staff>
|
||||
<Staff id="2">
|
||||
<Measure number="1">
|
||||
<TimeSig>
|
||||
<sigN>4</sigN>
|
||||
<sigD>4</sigD>
|
||||
<showCourtesySig>1</showCourtesySig>
|
||||
</TimeSig>
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration z="4" n="4"/>
|
||||
</Rest>
|
||||
<BarLine>
|
||||
<subtype>end</subtype>
|
||||
<span>1</span>
|
||||
</BarLine>
|
||||
</Measure>
|
||||
</Staff>
|
||||
<Staff id="3">
|
||||
<Measure number="1">
|
||||
<TimeSig>
|
||||
<sigN>4</sigN>
|
||||
<sigD>4</sigD>
|
||||
<showCourtesySig>1</showCourtesySig>
|
||||
</TimeSig>
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration z="4" n="4"/>
|
||||
</Rest>
|
||||
<BarLine>
|
||||
<subtype>end</subtype>
|
||||
<span>1</span>
|
||||
</BarLine>
|
||||
</Measure>
|
||||
</Staff>
|
||||
</Score>
|
||||
</museScore>
|
276
mtest/libmscore/album/album_105641-no-initial-clef-02.mscx
Normal file
276
mtest/libmscore/album/album_105641-no-initial-clef-02.mscx
Normal file
|
@ -0,0 +1,276 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<museScore version="2.06">
|
||||
<Score>
|
||||
<LayerTag id="0" tag="default"></LayerTag>
|
||||
<currentLayer>0</currentLayer>
|
||||
<Division>480</Division>
|
||||
<Style>
|
||||
<lyricsDistance>3</lyricsDistance>
|
||||
<lyricsMinBottomDistance>4.5</lyricsMinBottomDistance>
|
||||
<hideEmptyStaves>1</hideEmptyStaves>
|
||||
<showHeader>1</showHeader>
|
||||
<evenHeaderR>$p</evenHeaderR>
|
||||
<oddHeaderL>$p</oddHeaderL>
|
||||
<evenFooterL></evenFooterL>
|
||||
<evenFooterC></evenFooterC>
|
||||
<oddFooterC>$C</oddFooterC>
|
||||
<oddFooterR></oddFooterR>
|
||||
<TextStyle>
|
||||
<halign>left</halign>
|
||||
<valign>top</valign>
|
||||
<xoffset>0</xoffset>
|
||||
<yoffset>-4</yoffset>
|
||||
<offsetType>spatium</offsetType>
|
||||
<name>Staff</name>
|
||||
<family>FreeSerif</family>
|
||||
<size>11</size>
|
||||
<italic>1</italic>
|
||||
<sizeIsSpatiumDependent>1</sizeIsSpatiumDependent>
|
||||
</TextStyle>
|
||||
<TextStyle>
|
||||
<halign>center</halign>
|
||||
<valign>top</valign>
|
||||
<offsetType>spatium</offsetType>
|
||||
<name>Header</name>
|
||||
<family>FreeSerif</family>
|
||||
<size>12</size>
|
||||
<bold>1</bold>
|
||||
</TextStyle>
|
||||
<page-layout>
|
||||
<page-height>1584</page-height>
|
||||
<page-width>1224</page-width>
|
||||
<page-margins type="even">
|
||||
<left-margin>56.16</left-margin>
|
||||
<right-margin>56.16</right-margin>
|
||||
<top-margin>56.16</top-margin>
|
||||
<bottom-margin>77.76</bottom-margin>
|
||||
</page-margins>
|
||||
<page-margins type="odd">
|
||||
<left-margin>56.16</left-margin>
|
||||
<right-margin>56.16</right-margin>
|
||||
<top-margin>56.16</top-margin>
|
||||
<bottom-margin>77.76</bottom-margin>
|
||||
</page-margins>
|
||||
</page-layout>
|
||||
<Spatium>1.4986</Spatium>
|
||||
</Style>
|
||||
<showInvisible>0</showInvisible>
|
||||
<showUnprintable>1</showUnprintable>
|
||||
<showFrames>1</showFrames>
|
||||
<showMargins>0</showMargins>
|
||||
<metaTag name="arranger"></metaTag>
|
||||
<metaTag name="composer"></metaTag>
|
||||
<metaTag name="copyright"></metaTag>
|
||||
<metaTag name="lyricist"></metaTag>
|
||||
<metaTag name="movementNumber"></metaTag>
|
||||
<metaTag name="movementTitle"></metaTag>
|
||||
<metaTag name="poet"></metaTag>
|
||||
<metaTag name="source"></metaTag>
|
||||
<metaTag name="translator"></metaTag>
|
||||
<metaTag name="workNumber"></metaTag>
|
||||
<metaTag name="workTitle"></metaTag>
|
||||
<PageList>
|
||||
<Page>
|
||||
<System>
|
||||
</System>
|
||||
</Page>
|
||||
</PageList>
|
||||
<Part>
|
||||
<Staff id="1">
|
||||
<StaffType group="pitched">
|
||||
<name>stdNormal</name>
|
||||
</StaffType>
|
||||
<bracket type="-1" span="0"/>
|
||||
</Staff>
|
||||
<trackName>Voice</trackName>
|
||||
<Instrument>
|
||||
<longName>Voice</longName>
|
||||
<shortName>Vo.</shortName>
|
||||
<trackName>Voice</trackName>
|
||||
<minPitchP>36</minPitchP>
|
||||
<maxPitchP>94</maxPitchP>
|
||||
<minPitchA>40</minPitchA>
|
||||
<maxPitchA>79</maxPitchA>
|
||||
<instrumentId>voice.vocals</instrumentId>
|
||||
<Articulation>
|
||||
<velocity>100</velocity>
|
||||
<gateTime>100</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="staccatissimo">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>33</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="staccato">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>50</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="portato">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>67</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="tenuto">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>100</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="marcato">
|
||||
<velocity>120</velocity>
|
||||
<gateTime>67</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="sforzato">
|
||||
<velocity>120</velocity>
|
||||
<gateTime>100</gateTime>
|
||||
</Articulation>
|
||||
<Channel>
|
||||
<controller ctrl="0" value="1"/>
|
||||
<controller ctrl="32" value="1"/>
|
||||
<program value="52"/>
|
||||
</Channel>
|
||||
</Instrument>
|
||||
</Part>
|
||||
<Part>
|
||||
<Staff id="2">
|
||||
<StaffType group="pitched">
|
||||
<name>stdNormal</name>
|
||||
</StaffType>
|
||||
<bracket type="1" span="2"/>
|
||||
<barLineSpan>2</barLineSpan>
|
||||
</Staff>
|
||||
<Staff id="3">
|
||||
<StaffType group="pitched">
|
||||
<name>stdNormal</name>
|
||||
</StaffType>
|
||||
<defaultClef>F</defaultClef>
|
||||
<bracket type="-1" span="0"/>
|
||||
<barLineSpan>0</barLineSpan>
|
||||
</Staff>
|
||||
<trackName>Piano</trackName>
|
||||
<Instrument>
|
||||
<longName>Piano</longName>
|
||||
<shortName>Pno.</shortName>
|
||||
<trackName>Piano</trackName>
|
||||
<minPitchP>21</minPitchP>
|
||||
<maxPitchP>108</maxPitchP>
|
||||
<minPitchA>21</minPitchA>
|
||||
<maxPitchA>108</maxPitchA>
|
||||
<instrumentId>keyboard.piano</instrumentId>
|
||||
<clef staff="2">F</clef>
|
||||
<Articulation>
|
||||
<velocity>100</velocity>
|
||||
<gateTime>95</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="staccatissimo">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>33</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="staccato">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>50</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="portato">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>67</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="tenuto">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>100</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="marcato">
|
||||
<velocity>120</velocity>
|
||||
<gateTime>67</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="sforzato">
|
||||
<velocity>120</velocity>
|
||||
<gateTime>100</gateTime>
|
||||
</Articulation>
|
||||
<Channel>
|
||||
<program value="0"/>
|
||||
</Channel>
|
||||
</Instrument>
|
||||
</Part>
|
||||
<Staff id="1">
|
||||
<Measure number="1">
|
||||
<irregular>1</irregular>
|
||||
<stretch>0</stretch>
|
||||
<Clef>
|
||||
<concertClefType>G8vb</concertClefType>
|
||||
<transposingClefType>G8vb</transposingClefType>
|
||||
</Clef>
|
||||
<KeySig>
|
||||
<accidental>-2</accidental>
|
||||
</KeySig>
|
||||
<TimeSig>
|
||||
<subtype>1</subtype>
|
||||
<sigN>4</sigN>
|
||||
<sigD>4</sigD>
|
||||
<showCourtesySig>1</showCourtesySig>
|
||||
</TimeSig>
|
||||
<Rest>
|
||||
<durationType>half</durationType>
|
||||
</Rest>
|
||||
<Rest>
|
||||
<durationType>half</durationType>
|
||||
</Rest>
|
||||
<BarLine>
|
||||
<subtype>end</subtype>
|
||||
<span>1</span>
|
||||
</BarLine>
|
||||
</Measure>
|
||||
</Staff>
|
||||
<Staff id="2">
|
||||
<Measure number="1">
|
||||
<KeySig>
|
||||
<accidental>-2</accidental>
|
||||
</KeySig>
|
||||
<TimeSig>
|
||||
<subtype>1</subtype>
|
||||
<sigN>4</sigN>
|
||||
<sigD>4</sigD>
|
||||
<showCourtesySig>1</showCourtesySig>
|
||||
</TimeSig>
|
||||
<Clef>
|
||||
<concertClefType>F</concertClefType>
|
||||
<transposingClefType>F</transposingClefType>
|
||||
</Clef>
|
||||
<Chord>
|
||||
<durationType>eighth</durationType>
|
||||
<Note>
|
||||
<pitch>53</pitch>
|
||||
<tpc>13</tpc>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Rest>
|
||||
<durationType>eighth</durationType>
|
||||
</Rest>
|
||||
<Rest>
|
||||
<durationType>quarter</durationType>
|
||||
</Rest>
|
||||
<Rest>
|
||||
<durationType>half</durationType>
|
||||
</Rest>
|
||||
<BarLine>
|
||||
<subtype>end</subtype>
|
||||
<span>2</span>
|
||||
</BarLine>
|
||||
</Measure>
|
||||
</Staff>
|
||||
<Staff id="3">
|
||||
<Measure number="1">
|
||||
<KeySig>
|
||||
<accidental>-2</accidental>
|
||||
</KeySig>
|
||||
<TimeSig>
|
||||
<subtype>1</subtype>
|
||||
<sigN>4</sigN>
|
||||
<sigD>4</sigD>
|
||||
<showCourtesySig>1</showCourtesySig>
|
||||
</TimeSig>
|
||||
<Rest>
|
||||
<durationType>half</durationType>
|
||||
</Rest>
|
||||
<Rest>
|
||||
<durationType>half</durationType>
|
||||
</Rest>
|
||||
</Measure>
|
||||
</Staff>
|
||||
</Score>
|
||||
</museScore>
|
288
mtest/libmscore/album/album_105641-no-initial-clef-ref.mscx
Normal file
288
mtest/libmscore/album/album_105641-no-initial-clef-ref.mscx
Normal file
|
@ -0,0 +1,288 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<museScore version="2.06">
|
||||
<Score>
|
||||
<LayerTag id="0" tag="default"></LayerTag>
|
||||
<currentLayer>0</currentLayer>
|
||||
<Division>480</Division>
|
||||
<Style>
|
||||
<lastSystemFillLimit>0</lastSystemFillLimit>
|
||||
<page-layout>
|
||||
<page-height>1683.36</page-height>
|
||||
<page-width>1190.88</page-width>
|
||||
<page-margins type="even">
|
||||
<left-margin>56.6929</left-margin>
|
||||
<right-margin>56.6929</right-margin>
|
||||
<top-margin>56.6929</top-margin>
|
||||
<bottom-margin>113.386</bottom-margin>
|
||||
</page-margins>
|
||||
<page-margins type="odd">
|
||||
<left-margin>56.6929</left-margin>
|
||||
<right-margin>56.6929</right-margin>
|
||||
<top-margin>56.6929</top-margin>
|
||||
<bottom-margin>113.386</bottom-margin>
|
||||
</page-margins>
|
||||
</page-layout>
|
||||
<Spatium>1.76389</Spatium>
|
||||
</Style>
|
||||
<showInvisible>1</showInvisible>
|
||||
<showUnprintable>1</showUnprintable>
|
||||
<showFrames>1</showFrames>
|
||||
<showMargins>0</showMargins>
|
||||
<metaTag name="arranger"></metaTag>
|
||||
<metaTag name="composer">Composer</metaTag>
|
||||
<metaTag name="copyright"></metaTag>
|
||||
<metaTag name="lyricist"></metaTag>
|
||||
<metaTag name="movementNumber"></metaTag>
|
||||
<metaTag name="movementTitle"></metaTag>
|
||||
<metaTag name="poet"></metaTag>
|
||||
<metaTag name="source"></metaTag>
|
||||
<metaTag name="translator"></metaTag>
|
||||
<metaTag name="workNumber"></metaTag>
|
||||
<metaTag name="workTitle">Title</metaTag>
|
||||
<PageList>
|
||||
<Page>
|
||||
<System>
|
||||
</System>
|
||||
</Page>
|
||||
</PageList>
|
||||
<Part>
|
||||
<Staff id="1">
|
||||
<StaffType group="pitched">
|
||||
<name>stdNormal</name>
|
||||
</StaffType>
|
||||
</Staff>
|
||||
<trackName>Piano</trackName>
|
||||
<Instrument>
|
||||
<shortName>Pno.</shortName>
|
||||
<trackName>Piano</trackName>
|
||||
<minPitchP>21</minPitchP>
|
||||
<maxPitchP>108</maxPitchP>
|
||||
<minPitchA>21</minPitchA>
|
||||
<maxPitchA>108</maxPitchA>
|
||||
<clef staff="2">F</clef>
|
||||
<Articulation>
|
||||
<velocity>100</velocity>
|
||||
<gateTime>95</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="staccatissimo">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>33</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="staccato">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>50</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="portato">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>67</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="tenuto">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>100</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="marcato">
|
||||
<velocity>120</velocity>
|
||||
<gateTime>67</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="sforzato">
|
||||
<velocity>120</velocity>
|
||||
<gateTime>100</gateTime>
|
||||
</Articulation>
|
||||
<Channel>
|
||||
<program value="0"/>
|
||||
</Channel>
|
||||
</Instrument>
|
||||
</Part>
|
||||
<Part>
|
||||
<Staff id="2">
|
||||
<StaffType group="pitched">
|
||||
<name>stdNormal</name>
|
||||
</StaffType>
|
||||
</Staff>
|
||||
<Staff id="3">
|
||||
<StaffType group="pitched">
|
||||
<name>stdNormal</name>
|
||||
</StaffType>
|
||||
<defaultClef>F</defaultClef>
|
||||
</Staff>
|
||||
<trackName>Piano</trackName>
|
||||
<Instrument>
|
||||
<shortName>Pno.</shortName>
|
||||
<trackName>Piano</trackName>
|
||||
<minPitchP>21</minPitchP>
|
||||
<maxPitchP>108</maxPitchP>
|
||||
<minPitchA>21</minPitchA>
|
||||
<maxPitchA>108</maxPitchA>
|
||||
<instrumentId>keyboard.piano</instrumentId>
|
||||
<clef staff="2">F</clef>
|
||||
<Articulation>
|
||||
<velocity>100</velocity>
|
||||
<gateTime>95</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="staccatissimo">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>33</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="staccato">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>50</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="portato">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>67</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="tenuto">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>100</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="marcato">
|
||||
<velocity>120</velocity>
|
||||
<gateTime>67</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="sforzato">
|
||||
<velocity>120</velocity>
|
||||
<gateTime>100</gateTime>
|
||||
</Articulation>
|
||||
<Channel>
|
||||
<program value="0"/>
|
||||
</Channel>
|
||||
</Instrument>
|
||||
</Part>
|
||||
<Staff id="1">
|
||||
<Measure number="1">
|
||||
<LayoutBreak>
|
||||
<subtype>line</subtype>
|
||||
</LayoutBreak>
|
||||
<LayoutBreak>
|
||||
<subtype>section</subtype>
|
||||
</LayoutBreak>
|
||||
<TimeSig>
|
||||
<sigN>4</sigN>
|
||||
<sigD>4</sigD>
|
||||
<showCourtesySig>1</showCourtesySig>
|
||||
</TimeSig>
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration z="4" n="4"/>
|
||||
</Rest>
|
||||
<BarLine>
|
||||
<subtype>end</subtype>
|
||||
<span>1</span>
|
||||
</BarLine>
|
||||
</Measure>
|
||||
<Measure number="1">
|
||||
<irregular>1</irregular>
|
||||
<stretch>0</stretch>
|
||||
<Clef>
|
||||
<concertClefType>G8vb</concertClefType>
|
||||
<transposingClefType>G8vb</transposingClefType>
|
||||
</Clef>
|
||||
<KeySig>
|
||||
<accidental>-2</accidental>
|
||||
</KeySig>
|
||||
<TimeSig>
|
||||
<subtype>1</subtype>
|
||||
<sigN>4</sigN>
|
||||
<sigD>4</sigD>
|
||||
<showCourtesySig>1</showCourtesySig>
|
||||
</TimeSig>
|
||||
<Rest>
|
||||
<durationType>half</durationType>
|
||||
</Rest>
|
||||
<Rest>
|
||||
<durationType>half</durationType>
|
||||
</Rest>
|
||||
<BarLine>
|
||||
<subtype>end</subtype>
|
||||
<span>1</span>
|
||||
</BarLine>
|
||||
</Measure>
|
||||
</Staff>
|
||||
<Staff id="2">
|
||||
<Measure number="1">
|
||||
<TimeSig>
|
||||
<sigN>4</sigN>
|
||||
<sigD>4</sigD>
|
||||
<showCourtesySig>1</showCourtesySig>
|
||||
</TimeSig>
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration z="4" n="4"/>
|
||||
</Rest>
|
||||
<BarLine>
|
||||
<subtype>end</subtype>
|
||||
<span>1</span>
|
||||
</BarLine>
|
||||
</Measure>
|
||||
<Measure number="1">
|
||||
<KeySig>
|
||||
<accidental>-2</accidental>
|
||||
</KeySig>
|
||||
<TimeSig>
|
||||
<subtype>1</subtype>
|
||||
<sigN>4</sigN>
|
||||
<sigD>4</sigD>
|
||||
<showCourtesySig>1</showCourtesySig>
|
||||
</TimeSig>
|
||||
<Clef>
|
||||
<concertClefType>F</concertClefType>
|
||||
<transposingClefType>F</transposingClefType>
|
||||
</Clef>
|
||||
<Chord>
|
||||
<durationType>eighth</durationType>
|
||||
<Note>
|
||||
<pitch>53</pitch>
|
||||
<tpc>13</tpc>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Rest>
|
||||
<durationType>eighth</durationType>
|
||||
</Rest>
|
||||
<Rest>
|
||||
<durationType>quarter</durationType>
|
||||
</Rest>
|
||||
<Rest>
|
||||
<durationType>half</durationType>
|
||||
</Rest>
|
||||
<BarLine>
|
||||
<subtype>end</subtype>
|
||||
<span>2</span>
|
||||
</BarLine>
|
||||
</Measure>
|
||||
</Staff>
|
||||
<Staff id="3">
|
||||
<Measure number="1">
|
||||
<TimeSig>
|
||||
<sigN>4</sigN>
|
||||
<sigD>4</sigD>
|
||||
<showCourtesySig>1</showCourtesySig>
|
||||
</TimeSig>
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration z="4" n="4"/>
|
||||
</Rest>
|
||||
<BarLine>
|
||||
<subtype>end</subtype>
|
||||
<span>1</span>
|
||||
</BarLine>
|
||||
</Measure>
|
||||
<Measure number="1">
|
||||
<KeySig>
|
||||
<accidental>-2</accidental>
|
||||
</KeySig>
|
||||
<TimeSig>
|
||||
<subtype>1</subtype>
|
||||
<sigN>4</sigN>
|
||||
<sigD>4</sigD>
|
||||
<showCourtesySig>1</showCourtesySig>
|
||||
</TimeSig>
|
||||
<Rest>
|
||||
<durationType>half</durationType>
|
||||
</Rest>
|
||||
<Rest>
|
||||
<durationType>half</durationType>
|
||||
</Rest>
|
||||
</Measure>
|
||||
</Staff>
|
||||
</Score>
|
||||
</museScore>
|
|
@ -33,6 +33,7 @@ class TestAlbum : public QObject, public MTest
|
|||
void album_76101();
|
||||
void album_105716();
|
||||
void album_105621();
|
||||
void album_105641();
|
||||
};
|
||||
|
||||
//---------------------------------------------------------
|
||||
|
@ -141,6 +142,24 @@ void TestAlbum::album_105621()
|
|||
album.remove(1); // crash would occur here in ~TBox
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
// album_105641
|
||||
// appends two scores of 3 staves: 1-staff piano & 2-staff piano.
|
||||
// second score "album_105641-no-initial-clef-02.mscx" doesn't have initial clef on 2nd staff,
|
||||
// but instead has a clef before first chordrest of 1st measure.
|
||||
// desired behavior is no crash. Should not try to add initial clef if initial clef doesn't exist.
|
||||
//--------------------------------------------------------
|
||||
|
||||
void TestAlbum::album_105641()
|
||||
{
|
||||
Album album;
|
||||
album.setName("test");
|
||||
album.append(new AlbumItem(root + "/" + DIR + "album_105641-no-initial-clef-01.mscx"));
|
||||
album.append(new AlbumItem(root + "/" + DIR + "album_105641-no-initial-clef-02.mscx"));
|
||||
album.createScore("album_105641-no-initial-clef.mscx");
|
||||
QVERIFY(compareFiles("album_105641-no-initial-clef.mscx", DIR + "album_105641-no-initial-clef-ref.mscx"));
|
||||
}
|
||||
|
||||
QTEST_MAIN(TestAlbum)
|
||||
#include "tst_album.moc"
|
||||
|
||||
|
|
Loading…
Reference in a new issue