fixed undefined values

This commit is contained in:
Roman Pudashkin 2020-12-10 17:23:12 +02:00 committed by pereverzev+v
parent 56a8963f75
commit f464d825fb
6 changed files with 22 additions and 22 deletions

View file

@ -85,7 +85,7 @@ Popup {
Rectangle {
color: fillColor
border { width: root.borderWidth; color: borderColor }
border { width: root.borderWidth; color: root.borderColor }
anchors {
top: arrow.bottom

View file

@ -128,15 +128,15 @@ struct Instrument
PitchRange professionalPitchRange;
ClefTypeList clefs[MAX_STAVES];
int staffLines[MAX_STAVES];
BracketType bracket[MAX_STAVES];
int bracketSpan[MAX_STAVES];
int barlineSpan[MAX_STAVES];
bool smallStaff[MAX_STAVES];
int staffLines[MAX_STAVES] = {0};
BracketType bracket[MAX_STAVES] = {BracketType::NO_BRACKET};
int bracketSpan[MAX_STAVES] = {0};
int barlineSpan[MAX_STAVES] = {0};
bool smallStaff[MAX_STAVES] = {false};
Interval transpose;
StaffGroup staffGroup;
StaffGroup staffGroup = StaffGroup::STANDARD;
const StaffType* staffTypePreset = nullptr;
bool useDrumset = false;

View file

@ -24,7 +24,7 @@
using namespace mu::notation;
using namespace mu::instruments;
Ms::Instrument InstrumentsConveter::convertInstrument(const Instrument& instrument)
Ms::Instrument InstrumentsConverter::convertInstrument(const Instrument& instrument)
{
Ms::Instrument result;
result.setAmateurPitchRange(instrument.amateurPitchRange.min, instrument.amateurPitchRange.max);
@ -63,7 +63,7 @@ Ms::Instrument InstrumentsConveter::convertInstrument(const Instrument& instrume
return result;
}
Instrument InstrumentsConveter::convertInstrument(const Ms::Instrument& instrument)
Instrument InstrumentsConverter::convertInstrument(const Ms::Instrument& instrument)
{
Instrument result;
result.amateurPitchRange = PitchRange(instrument.minPitchA(), instrument.maxPitchA());
@ -100,7 +100,7 @@ Instrument InstrumentsConveter::convertInstrument(const Ms::Instrument& instrume
return result;
}
QList<Ms::NamedEventList> InstrumentsConveter::convertMidiActions(const MidiActionList& midiActions)
QList<Ms::NamedEventList> InstrumentsConverter::convertMidiActions(const MidiActionList& midiActions)
{
QList<Ms::NamedEventList> result;
@ -122,7 +122,7 @@ QList<Ms::NamedEventList> InstrumentsConveter::convertMidiActions(const MidiActi
return result;
}
MidiActionList InstrumentsConveter::convertMidiActions(const QList<Ms::NamedEventList>& midiActions)
MidiActionList InstrumentsConverter::convertMidiActions(const QList<Ms::NamedEventList>& midiActions)
{
MidiActionList result;

View file

@ -28,7 +28,7 @@ class NamedEventList;
}
namespace mu::notation {
class InstrumentsConveter
class InstrumentsConverter
{
public:
static Ms::Instrument convertInstrument(const instruments::Instrument& instrument);

View file

@ -882,7 +882,7 @@ void NotationInteraction::selectInstrument(InstrumentChange *instrumentChange)
return;
}
Ms::Instrument instrument = InstrumentsConveter::convertInstrument(selectedIstrument);
Ms::Instrument instrument = InstrumentsConverter::convertInstrument(selectedIstrument);
instrumentChange->setInit(true);
instrumentChange->setupInstrument(&instrument);

View file

@ -103,7 +103,7 @@ NotifyList<Instrument> NotationParts::instrumentList(const ID& partId) const
NotifyList<Instrument> result;
for (const Ms::Instrument* instrument: instruments(part).values()) {
result.push_back(InstrumentsConveter::convertInstrument(*instrument));
result.push_back(InstrumentsConverter::convertInstrument(*instrument));
}
ChangedNotifier<Instrument>* notifier = partNotifier(partId);
@ -150,7 +150,7 @@ void NotationParts::setInstruments(const InstrumentList& instruments)
Part* part = new Part(score());
part->setPartName(instrument.name);
part->setInstrument(InstrumentsConveter::convertInstrument(instrument));
part->setInstrument(InstrumentsConverter::convertInstrument(instrument));
score()->undo(new Ms::InsertPart(part, lastStaffIndex()));
appendStaves(part, instrument);
@ -277,7 +277,7 @@ void NotationParts::setInstrumentVisible(const ID& instrumentId, const ID& fromP
apply();
ChangedNotifier<Instrument>* notifier = partNotifier(fromPartId);
notifier->itemChanged(InstrumentsConveter::convertInstrument(*instrumentInfo.instrument));
notifier->itemChanged(InstrumentsConverter::convertInstrument(*instrumentInfo.instrument));
m_partsChanged.notify();
}
@ -355,7 +355,7 @@ void NotationParts::assignIstrumentToSelectedChord(Ms::Instrument* instrument)
apply();
ChangedNotifier<Instrument>* notifier = partNotifier(part->id());
notifier->itemChanged(InstrumentsConveter::convertInstrument(*instrument));
notifier->itemChanged(InstrumentsConverter::convertInstrument(*instrument));
m_partsChanged.notify();
}
@ -432,7 +432,7 @@ void NotationParts::setInstrumentName(const ID& instrumentId, const ID& fromPart
InstrumentInfo newInstrumentInfo = this->instrumentInfo(instrumentId, part);
ChangedNotifier<Instrument>* notifier = partNotifier(part->id());
notifier->itemChanged(InstrumentsConveter::convertInstrument(*newInstrumentInfo.instrument));
notifier->itemChanged(InstrumentsConverter::convertInstrument(*newInstrumentInfo.instrument));
m_partsChanged.notify();
}
@ -454,7 +454,7 @@ void NotationParts::setInstrumentAbbreviature(const ID& instrumentId, const ID&
InstrumentInfo newInstrumentInfo = this->instrumentInfo(instrumentId, part);
ChangedNotifier<Instrument>* notifier = partNotifier(part->id());
notifier->itemChanged(InstrumentsConveter::convertInstrument(*newInstrumentInfo.instrument));
notifier->itemChanged(InstrumentsConverter::convertInstrument(*newInstrumentInfo.instrument));
m_partsChanged.notify();
}
@ -660,7 +660,7 @@ void NotationParts::appendDoublingInstrument(const Instrument& instrument, const
}
startEdit();
part->setInstrument(InstrumentsConveter::convertInstrument(instrument), Ms::Fraction::fromTicks(lastTick + 1));
part->setInstrument(InstrumentsConverter::convertInstrument(instrument), Ms::Fraction::fromTicks(lastTick + 1));
doSetPartName(part, formatPartName(part));
apply();
@ -733,12 +733,12 @@ void NotationParts::replaceInstrument(const ID& instrumentId, const ID& fromPart
}
startEdit();
part->setInstrument(InstrumentsConveter::convertInstrument(newInstrument), oldInstrumentInfo.fraction);
part->setInstrument(InstrumentsConverter::convertInstrument(newInstrument), oldInstrumentInfo.fraction);
doSetPartName(part, formatPartName(part));
apply();
ChangedNotifier<Instrument>* notifier = partNotifier(part->id());
notifier->itemReplaced(InstrumentsConveter::convertInstrument(*oldInstrumentInfo.instrument), newInstrument);
notifier->itemReplaced(InstrumentsConverter::convertInstrument(*oldInstrumentInfo.instrument), newInstrument);
m_partsNotifier->itemChanged(part);
m_partsChanged.notify();