Skip to content

Commit

Permalink
fix #33726
Browse files Browse the repository at this point in the history
  • Loading branch information
wschweer committed Nov 3, 2014
1 parent 647c643 commit 4ff52ea
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 15 deletions.
5 changes: 3 additions & 2 deletions libmscore/excerpt.cpp
Expand Up @@ -97,8 +97,9 @@ static void localSetScore(void* score, Element* element)
// createExcerpt
//---------------------------------------------------------

void createExcerpt(Score* score, const QList<Part*>& parts)
void createExcerpt(Score* score, Excerpt* excerpt)
{
QList<Part*>& parts = excerpt->parts();
QList<int> srcStaves;

Score* oscore = parts.front()->score();
Expand Down Expand Up @@ -149,7 +150,7 @@ void createExcerpt(Score* score, const QList<Part*>& parts)

VBox* titleFramePart = static_cast<VBox*>(measure);
titleFramePart->copyValues(titleFrameScore);
QString partLabel = parts.front()->longName();
QString partLabel = excerpt->title(); // parts.front()->longName();
if (!partLabel.isEmpty()) {
Text* txt = new Text(score);
txt->setTextStyleType(TextStyleType::INSTRUMENT_EXCERPT);
Expand Down
2 changes: 1 addition & 1 deletion libmscore/excerpt.h
Expand Up @@ -43,7 +43,7 @@ class Excerpt {
void setTitle(const QString& s) { _title = s; }
};

extern void createExcerpt(Score*, const QList<Part*>&);
extern void createExcerpt(Score*, Excerpt*);
extern void cloneStaves(Score* oscore, Score* score, const QList<int>& map);
extern void cloneStaff(Staff* ostaff, Staff* nstaff);
extern void cloneStaff2(Staff* ostaff, Staff* nstaff, int stick, int etick);
Expand Down
7 changes: 1 addition & 6 deletions libmscore/read114.cpp
Expand Up @@ -752,12 +752,7 @@ Score::FileError Score::read114(XmlReader& e)
excerpt->setScore(nscore);
nscore->setName(excerpt->title());
nscore->style()->set(StyleIdx::createMultiMeasureRests, true);
Ms::createExcerpt(nscore, excerpt->parts());
nscore->rebuildMidiMapping();
nscore->updateChannel();
nscore->updateNotes();
nscore->addLayoutFlags(LayoutFlag::FIX_PITCH_VELO);
nscore->doLayout();
Ms::createExcerpt(nscore, excerpt);
}
}

Expand Down
7 changes: 1 addition & 6 deletions mscore/excerptsdialog.cpp
Expand Up @@ -292,14 +292,9 @@ void ExcerptsDialog::createExcerptClicked(QListWidgetItem* cur)

score->startCmd();
score->undo(new AddExcerpt(nscore));
Ms::createExcerpt(nscore, e->parts());
Ms::createExcerpt(nscore, e);
score->endCmd();

nscore->rebuildMidiMapping();
nscore->updateChannel();
nscore->addLayoutFlags(LayoutFlag::FIX_PITCH_VELO);
nscore->setLayoutAll(true);

partList->setEnabled(false);
title->setEnabled(false);
}
Expand Down

1 comment on commit 4ff52ea

@Jojo-Schmitz
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Causes Travis to fail mtests, in tst_chordsymbols and tst_parts, in 2 places each

Please sign in to comment.