Skip to content

Commit

Permalink
[MU3] #290356: Fix copy-paste functionality for the LetRing, PalmMute…
Browse files Browse the repository at this point in the history
… and Vibrato elements.
  • Loading branch information
dnovikov committed Jan 17, 2021
1 parent 28aa7ba commit 687d1ef
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions libmscore/paste.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,9 @@ void Score::readAddConnector(ConnectorInfoReader* info, bool pasteMode)
case ElementType::TRILL:
case ElementType::TEXTLINE:
case ElementType::VOLTA:
case ElementType::PALM_MUTE:
case ElementType::LET_RING:
case ElementType::VIBRATO:
{
Spanner* sp = toSpanner(info->connector());
const Location& l = info->location();
Expand Down Expand Up @@ -816,15 +819,6 @@ void Score::pasteSymbols(XmlReader& e, ChordRest* dst)
d->setParent(destCR->segment());
undoAddElement(d);
}
else if (tag == "HairPin") {
Hairpin* h = new Hairpin(this);
h->setTrack(destTrack);
h->read(e);
h->setTrack(destTrack);
h->setTrack2(destTrack);
h->setTick(destTick);
undoAddElement(h);
}
else {
//
// All other elements are positioned respecting the distance in chords
Expand Down Expand Up @@ -970,6 +964,19 @@ void Score::pasteSymbols(XmlReader& e, ChordRest* dst)
el->setParent(cr);
undoAddElement(el);
}
else if (tag == "HairPin"
|| tag == "PalmMute"
|| tag == "LetRing"
|| tag == "Vibrato"
) {
Spanner* sp = toSpanner(Element::name2Element(tag, this));
sp->setTrack(destTrack);
sp->read(e);
sp->setTrack(destTrack);
sp->setTrack2(destTrack);
sp->setTick(destTick);
undoAddElement(sp);
}
else {
qDebug("PasteSymbols: element %s not handled", tag.toUtf8().data());
e.skipCurrentElement(); // ignore
Expand Down

0 comments on commit 687d1ef

Please sign in to comment.