Skip to content

Commit

Permalink
fix #25394, fix #25457: do not sort notes in chord while looping thro…
Browse files Browse the repository at this point in the history
…ugh notes in chord
  • Loading branch information
lasconic committed Apr 19, 2014
1 parent 9296c7e commit 0a09d44
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions libmscore/note.cpp
Expand Up @@ -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);
}

//---------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion libmscore/note.h
Expand Up @@ -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);
Expand Down

0 comments on commit 0a09d44

Please sign in to comment.