diff --git a/libmscore/cmd.cpp b/libmscore/cmd.cpp index fbecf749ee..4e0d009905 100644 --- a/libmscore/cmd.cpp +++ b/libmscore/cmd.cpp @@ -1347,7 +1347,7 @@ static void setTpc(Note* oNote, int tpc, int& newTpc1, int& newTpc2) /// Increment/decrement pitch of note by one or by an octave. //--------------------------------------------------------- -void Score::upDown(bool up, UpDownMode mode, bool updateSelection) +void Score::upDown(bool up, UpDownMode mode) { QList el = selection().uniqueNotes(); @@ -1515,12 +1515,6 @@ void Score::upDown(bool up, UpDownMode mode, bool updateSelection) // play new note with velocity 80 for 0.3 sec: setPlayNote(true); } - - if (updateSelection) { - _selection.clear(); - for (Note* note : el) - _selection.add(note); - } } //--------------------------------------------------------- @@ -1528,15 +1522,15 @@ void Score::upDown(bool up, UpDownMode mode, bool updateSelection) /// Add the delta to the pitch of note. //--------------------------------------------------------- -void Score::upDownDelta(int pitchDelta, bool updateSelection) +void Score::upDownDelta(int pitchDelta) { while (pitchDelta > 0) { - upDown(true, UpDownMode::CHROMATIC, updateSelection); + upDown(true, UpDownMode::CHROMATIC); pitchDelta--; } while (pitchDelta < 0) { - upDown(false, UpDownMode::CHROMATIC, updateSelection); + upDown(false, UpDownMode::CHROMATIC); pitchDelta++; } } diff --git a/libmscore/score.h b/libmscore/score.h index ce6c07eb91..b2b17b6f78 100644 --- a/libmscore/score.h +++ b/libmscore/score.h @@ -667,8 +667,8 @@ class Score : public QObject, public ScoreElement { ChordRest* addClone(ChordRest* cr, const Fraction& tick, const TDuration& d); Rest* setRest(const Fraction& tick, int track, const Fraction&, bool useDots, Tuplet* tuplet, bool useFullMeasureRest = true); - void upDown(bool up, UpDownMode, bool updateSelection = true); - void upDownDelta(int pitchDelta, bool updateSelection); + void upDown(bool up, UpDownMode); + void upDownDelta(int pitchDelta); ChordRest* searchNote(const Fraction& tick, int track) const; // undo/redo ops diff --git a/mscore/pianoview.cpp b/mscore/pianoview.cpp index e616460df3..3f61bcbb22 100644 --- a/mscore/pianoview.cpp +++ b/mscore/pianoview.cpp @@ -826,7 +826,7 @@ void PianoView::mouseMoveEvent(QMouseEvent* event) } score->startCmd(); - score->upDownDelta(pitchDelta, false); + score->upDownDelta(pitchDelta); score->endCmd(); inProgressUndoEvent = true;