Skip to content

Commit

Permalink
fix #10806: Generating parts doesnt show the tabs at first
Browse files Browse the repository at this point in the history
  • Loading branch information
wschweer committed Apr 25, 2016
1 parent b3cd356 commit 994090f
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 16 deletions.
4 changes: 2 additions & 2 deletions libmscore/cmd.cpp
Expand Up @@ -88,8 +88,8 @@ void CmdState::reset()
_updateMode = UpdateMode::DoNothing;
// _playNote = false; ///< play selected note after command
// _playChord = false; ///< play whole chord for the selected note
_excerptsChanged = false;
_instrumentsChanged = false;
// _excerptsChanged = false;
// _instrumentsChanged = false;
// _selectionChanged = false;
_startTick = -1;
_endTick = -1;
Expand Down
2 changes: 1 addition & 1 deletion libmscore/layout.cpp
Expand Up @@ -3463,7 +3463,7 @@ bool Score::collectPage(LayoutContext& lc)
Page* page = getEmptyPage(lc);
qreal y = page->tm();
qreal ey = page->height() - page->bm();
System* s1 = 0; // previous system
System* s1 = 0; // previous system
System* s2 = lc.curSystem;

for (;;) {
Expand Down
6 changes: 1 addition & 5 deletions mscore/excerptsdialog.cpp
Expand Up @@ -313,7 +313,7 @@ void ExcerptsDialog::createExcerptClicked(QListWidgetItem* cur)
if (e->parts().isEmpty())
return;

Score* nscore = new Score(static_cast<MasterScore*>(e->oscore()));
Score* nscore = new Score(e->oscore());
e->setPartScore(nscore);

nscore->setName(e->title()); // needed before AddExcerpt
Expand Down Expand Up @@ -408,7 +408,6 @@ void ExcerptsDialog::accept()
QListWidgetItem* cur = excerptList->currentItem();
if (cur == 0)
continue;

createExcerptClicked(cur);
}

Expand Down Expand Up @@ -456,10 +455,7 @@ void ExcerptsDialog::accept()
score->undo(new SwapExcerpt(score, i, position));
}
}

score->setExcerptsChanged(true);
score->endCmd();

QDialog::accept();
}
}
Expand Down
14 changes: 7 additions & 7 deletions mscore/musescore.cpp
Expand Up @@ -2203,10 +2203,10 @@ static bool processNonGui()
}
else {
if (cs->excerpts().size() == 0) {
QList<Excerpt*> exceprts = Excerpt::createAllExcerpt(cs->masterScore());
auto excerpts = Excerpt::createAllExcerpt(cs->masterScore());

foreach(Excerpt* e, exceprts) {
Score* nscore = new Score(static_cast<MasterScore*>(e->oscore()));
for (Excerpt* e : excerpts) {
Score* nscore = new Score(e->oscore());
e->setPartScore(nscore);
nscore->masterScore()->setName(e->title()); // needed before AddExcerpt
nscore->style()->set(StyleIdx::createMultiMeasureRests, true);
Expand All @@ -2218,7 +2218,7 @@ static bool processNonGui()
}
QList<Score*> scores;
scores.append(cs);
foreach(Excerpt* e, cs->excerpts())
for (Excerpt* e : cs->excerpts())
scores.append(e->partScore());
return mscore->savePdf(scores, fn);
}
Expand All @@ -2230,9 +2230,9 @@ static bool processNonGui()
}
else {
if (cs->excerpts().size() == 0) {
auto exceprts = Excerpt::createAllExcerpt(cs->masterScore());
for (Excerpt* e: exceprts) {
auto excerpts = Excerpt::createAllExcerpt(cs->masterScore());

for (Excerpt* e: excerpts) {
Score* nscore = new Score(e->oscore());
e->setPartScore(nscore);
nscore->setName(e->title()); // needed before AddExcerpt
Expand Down
69 changes: 68 additions & 1 deletion mtest/test.mscx
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<museScore version="2.07">
<programVersion>3.0.0</programVersion>
<programRevision>3cb7621</programRevision>
<programRevision>3543170</programRevision>
<Score>
<LayerTag id="0" tag="default"></LayerTag>
<currentLayer>0</currentLayer>
Expand Down Expand Up @@ -87,6 +87,57 @@
</Channel>
</Instrument>
</Part>
<Part>
<Staff id="2">
<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>
<program value="52"/>
<synti>Fluid</synti>
</Channel>
</Instrument>
</Part>
<Staff id="1">
<VBox>
<height>10</height>
Expand Down Expand Up @@ -152,5 +203,21 @@
</BarLine>
</Measure>
</Staff>
<Staff id="2">
<Measure number="1">
<KeySig>
<accidental>0</accidental>
</KeySig>
<TimeSig>
<sigN>4</sigN>
<sigD>4</sigD>
<showCourtesySig>1</showCourtesySig>
</TimeSig>
<Rest>
<durationType>measure</durationType>
<duration z="4" n="4"/>
</Rest>
</Measure>
</Staff>
</Score>
</museScore>

0 comments on commit 994090f

Please sign in to comment.