Skip to content

Commit

Permalink
Merge pull request #4788 from lvinken/285631-misplaced-ties
Browse files Browse the repository at this point in the history
fix #285631 - Misplaced ties when importing MusicXML files
  • Loading branch information
anatoly-os committed Mar 11, 2019
1 parent c5c83a5 commit 995e0f3
Show file tree
Hide file tree
Showing 5 changed files with 2,771 additions and 4 deletions.
6 changes: 3 additions & 3 deletions mscore/importmxmlpass2.cpp
Expand Up @@ -4587,7 +4587,7 @@ Note* MusicXMLParserPass2::note(const QString& partId,
auto scoreRelStaff = _score->staffIdx(part); // zero-based number of parts first staff in the score
auto partRelTrack = msTrack + msVoice - scoreRelStaff * VOICES;
// handle notations
notations.addToScore(cr, note, noteStartTime.ticks(), partRelTrack, _slurs, _glissandi, _spanners, _trills, _tie);
notations.addToScore(cr, note, noteStartTime.ticks(), _slurs, _glissandi, _spanners, _trills, _tie);

// handle grace after state: remember current grace list size
if (grace && notations.mustStopGraceAFter()) {
Expand Down Expand Up @@ -6058,7 +6058,7 @@ void MusicXMLParserNotations::parse()
as in that case note is a nullptr.
*/

void MusicXMLParserNotations::addToScore(ChordRest* const cr, Note* const note, const int tick, const int track, SlurStack& slurs,
void MusicXMLParserNotations::addToScore(ChordRest* const cr, Note* const note, const int tick, SlurStack& slurs,
Glissando* glissandi[MAX_NUMBER_LEVEL][2], MusicXmlSpannerMap& spanners,
TrillStack& trills, Tie*& tie)
{
Expand Down Expand Up @@ -6100,7 +6100,7 @@ void MusicXMLParserNotations::addToScore(ChordRest* const cr, Note* const note,
if (note) {
addChordLine(note, _chordLineType, _logger, &_e);
addTechnical(note);
addTie(_score, note, track, _tiedType, _tiedOrientation, _tiedLineType, tie, _logger, &_e);
addTie(_score, note, cr->track(), _tiedType, _tiedOrientation, _tiedLineType, tie, _logger, &_e);
}
}

Expand Down
2 changes: 1 addition & 1 deletion mscore/importmxmlpass2.h
Expand Up @@ -156,7 +156,7 @@ class MusicXMLParserNotations {
public:
MusicXMLParserNotations(QXmlStreamReader& e, Score* score, MxmlLogger* logger);
void parse();
void addToScore(ChordRest* const cr, Note* const note, const int tick, const int track, SlurStack& slurs,
void addToScore(ChordRest* const cr, Note* const note, const int tick, SlurStack& slurs,
Glissando* glissandi[MAX_NUMBER_LEVEL][2], MusicXmlSpannerMap& spanners, TrillStack& trills,
Tie*& tie);
MusicXmlTupletDesc tupletDesc() const { return _tupletDesc; }
Expand Down
Binary file added mtest/musicxml/io/testTrackHandling.pdf
Binary file not shown.

0 comments on commit 995e0f3

Please sign in to comment.