Skip to content

Commit

Permalink
fix #278169: images attached to rests not imported from MuseScore 2
Browse files Browse the repository at this point in the history
Resolves: https://musescore.org/en/node/278169

The code to read an Image tag attached to a note was present in read206.cpp
but the analogous code for a rest was missing. The same has been added.
  • Loading branch information
krkartikay committed Dec 27, 2019
1 parent f732351 commit 0d1262d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions libmscore/read206.cpp
Expand Up @@ -2064,6 +2064,16 @@ bool readChordRestProperties206(XmlReader& e, ChordRest* ch)
QPointF pt = e.readPoint();
ch->setOffset(pt * ch->spatium());
}
else if (ch->isRest() && tag == "Image"){
if (MScore::noImages)
e.skipCurrentElement();
else {
Image *image = new Image(ch->score());
image->setTrack(e.track());
image->read(e);
ch->add(image);
}
}
else if (!readDurationProperties206(e, ch))
return false;
return true;
Expand Down

0 comments on commit 0d1262d

Please sign in to comment.