new wizard: don't create instrument names if only one part
This commit is contained in:
parent
f5bed11a87
commit
0cd8973b68
3 changed files with 18 additions and 8 deletions
|
@ -140,7 +140,6 @@ class Event {
|
|||
Event& operator=(const Event&);
|
||||
bool operator==(const Event&) const;
|
||||
|
||||
// void write(MidiFile*) const;
|
||||
void write(Xml&) const;
|
||||
void dump() const;
|
||||
|
||||
|
|
|
@ -434,7 +434,7 @@ void InstrumentWizard::createInstruments(Score* cs)
|
|||
dst.push_back(sli->staff);
|
||||
}
|
||||
}
|
||||
#if 1
|
||||
|
||||
//
|
||||
// check for bar lines
|
||||
//
|
||||
|
@ -453,7 +453,19 @@ void InstrumentWizard::createInstruments(Score* cs)
|
|||
|
||||
staffIdx = nstaffIdx;
|
||||
}
|
||||
#endif
|
||||
|
||||
//
|
||||
// remove instrument names if only one part
|
||||
//
|
||||
if (cs->parts().size() == 1) {
|
||||
Part* part = cs->parts().front();
|
||||
if (part->instrList()->size() == 1) {
|
||||
Instrument& instrument = part->instrList()->instrument(0);
|
||||
instrument.setShortName(QTextDocumentFragment());
|
||||
instrument.setLongName(QTextDocumentFragment());
|
||||
}
|
||||
}
|
||||
|
||||
cs->setLayoutAll(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -1177,7 +1177,6 @@ void Palette::read(QDomElement e)
|
|||
element->read(ee);
|
||||
if (element->type() == ICON) {
|
||||
Icon* icon = static_cast<Icon*>(element);
|
||||
// Shortcut* s = getShortcut(icon->action());
|
||||
QIcon qicon(getAction(icon->action())->icon());
|
||||
icon->setAction(icon->action(), qicon);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue