fix #189736: On copy/paste measure(s) with slur(s) in score, the slur(s) get(s) lost in part

This commit is contained in:
lasconic 2017-08-16 17:46:35 +02:00
parent 7365542a18
commit 1ce41f90bc

View file

@ -644,7 +644,7 @@ Chord* Spanner::endChord()
ChordRest* Spanner::startCR()
{
Q_ASSERT(_anchor == Anchor::SEGMENT || _anchor == Anchor::CHORD);
if (!_startElement)
if (!_startElement || _startElement->score() != score())
_startElement = score()->findCR(tick(), track());
return static_cast<ChordRest*>(_startElement);
}
@ -656,7 +656,7 @@ ChordRest* Spanner::startCR()
ChordRest* Spanner::endCR()
{
Q_ASSERT(_anchor == Anchor::SEGMENT || _anchor == Anchor::CHORD);
if (!_endElement && isSlur()) {
if ((!_endElement || _endElement->score() != score())) {
Segment* s = score()->tick2segmentMM(tick2(), false, SegmentType::ChordRest);
_endElement = s ? toChordRest(s->element(track2())) : 0;
}