fix #26516: crash on repitch
This commit is contained in:
parent
2c43586a66
commit
6c003995d4
3 changed files with 4 additions and 3 deletions
|
@ -398,8 +398,9 @@ Note* Score::addPitch(int pitch, bool addFlag)
|
|||
if (_is.repitchMode() && _is.cr()->type() == ElementType::CHORD) {
|
||||
Chord* chord = static_cast<Chord*>(_is.cr());
|
||||
note = new Note(this);
|
||||
note->setNval(nval);
|
||||
note->setParent(chord);
|
||||
note->setTrack(chord->track());
|
||||
note->setNval(nval);
|
||||
if (!addFlag) {
|
||||
while (!chord->notes().isEmpty())
|
||||
undoRemoveElement(chord->notes().first());
|
||||
|
|
|
@ -837,8 +837,9 @@ void Score::repitchNote(const Position& p, bool replace)
|
|||
chord = static_cast<Chord*>(_is.cr());
|
||||
}
|
||||
Note* note = new Note(this);
|
||||
note->setNval(nval);
|
||||
note->setParent(chord);
|
||||
note->setTrack(chord->track());
|
||||
note->setNval(nval);
|
||||
|
||||
if (replace) {
|
||||
while (!chord->notes().isEmpty())
|
||||
|
|
|
@ -4787,7 +4787,6 @@ void ScoreView::cmdAddPitch(int note, bool addFlag)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
if (is.repitchMode())
|
||||
score()->repitchNote(pos, !addFlag);
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue