Skip to content

Commit

Permalink
fix #24906
Browse files Browse the repository at this point in the history
  • Loading branch information
wschweer committed Mar 20, 2014
1 parent 4f67214 commit cd4db7f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libmscore/chordrest.cpp
Expand Up @@ -83,7 +83,7 @@ ChordRest::ChordRest(const ChordRest& cr)
_tabDur = 0; // tab sur. symb. depends upon context: can't be
// simply copied from another CR

foreach(Articulation* a, cr._articulations) { // make deep copy
for (const Articulation* a : cr._articulations) { // make deep copy
Articulation* na = new Articulation(*a);
na->setParent(this);
na->setTrack(track());
Expand Down
16 changes: 14 additions & 2 deletions libmscore/excerpt.cpp
Expand Up @@ -36,6 +36,7 @@
#include "tiemap.h"
#include "layoutbreak.h"
#include "harmony.h"
#include "beam.h"

namespace Ms {

Expand Down Expand Up @@ -212,8 +213,8 @@ void cloneStaves(Score* oscore, Score* score, const QList<int>& map)
}
++st;
}
if (((srcTrack % VOICES) == 0) && track != -1) {
}
// if (((srcTrack % VOICES) == 0) && track != -1) {
// }
for (Segment* oseg = m->first(); oseg; oseg = oseg->next()) {
Segment* ns = nm->getSegment(oseg->segmentType(), oseg->tick());

Expand Down Expand Up @@ -256,6 +257,16 @@ void cloneStaves(Score* oscore, Score* score, const QList<int>& map)
if (oe->isChordRest()) {
ChordRest* ocr = static_cast<ChordRest*>(oe);
ChordRest* ncr = static_cast<ChordRest*>(ne);

if (ocr->beam() && !ocr->beam()->isEmpty() && ocr->beam()->elements().front() == ocr) {
Beam* nb = ocr->beam()->clone();
nb->clear();
nb->setTrack(track);
nb->setScore(score);
nb->add(ncr);
ncr->setBeam(nb);
}

Tuplet* ot = ocr->tuplet();
if (ot) {
Tuplet* nt = tupletMap.findNew(ot);
Expand All @@ -273,6 +284,7 @@ void cloneStaves(Score* oscore, Score* score, const QList<int>& map)
if (oe->type() == Element::CHORD) {
Chord* och = static_cast<Chord*>(ocr);
Chord* nch = static_cast<Chord*>(ncr);

int n = och->notes().size();
for (int i = 0; i < n; ++i) {
Note* on = och->notes().at(i);
Expand Down

0 comments on commit cd4db7f

Please sign in to comment.