From 0a09d4482d1439a1303d9b86138f1dd125264ed1 Mon Sep 17 00:00:00 2001 From: lasconic Date: Sat, 19 Apr 2014 19:29:43 +0200 Subject: [PATCH] fix #25394, fix #25457: do not sort notes in chord while looping through notes in chord --- libmscore/note.cpp | 7 ++++--- libmscore/note.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/libmscore/note.cpp b/libmscore/note.cpp index 3c470f919213..8307bc995442 100644 --- a/libmscore/note.cpp +++ b/libmscore/note.cpp @@ -1865,26 +1865,27 @@ void Note::updateAccidental(AccidentalState* as) // _line is the absolute line //--------------------------------------------------------- -void Note::updateRelLine() +void Note::updateRelLine(bool sort) { Staff* s = score()->staff(staffIdx() + chord()->staffMove()); ClefType clef = s->clef(chord()->tick()); int line = relStep(_line, clef); if (line != _line) { setLine(line); - if (chord()) + if (chord() && sort) chord()->sortNotes(); } } //--------------------------------------------------------- // updateLine +// sorting the chord is needed, after calling this method //--------------------------------------------------------- void Note::updateLine() { _line = absStep(tpc(), epitch()); - updateRelLine(); + updateRelLine(false); } //--------------------------------------------------------- diff --git a/libmscore/note.h b/libmscore/note.h index 6ccf64663aaf..5985831b6629 100644 --- a/libmscore/note.h +++ b/libmscore/note.h @@ -216,7 +216,7 @@ class Note : public Element { void addSpanner(Spanner*); void removeSpanner(Spanner*); int concertPitchIdx() const; - void updateRelLine(); + void updateRelLine(bool sort = true); public: Note(Score* s = 0);