fix #178176: Hang/crash by extending a glissando on a note with another one in the second staff

This commit is contained in:
lasconic 2017-02-28 16:48:15 +01:00
parent c0f92cc9f9
commit 24d192df37

View file

@ -408,13 +408,16 @@ void LineSegment::editDrag(const EditData& ed)
qDebug("LineSegment: move end anchor");
Note* noteOld = static_cast<Note*>(l->endElement());
Note* noteNew = static_cast<Note*>(e);
Note* sNote = static_cast<Note*>(l->startElement());
// do not change anchor if new note is before start note
if (sNote && sNote->chord() && noteNew->chord() && sNote->chord()->tick() < noteNew->chord()->tick()) {
noteOld->removeSpannerBack(l);
noteNew->addSpannerBack(l);
l->setEndElement(noteNew);
_userOff2 += noteOld->canvasPos() - noteNew->canvasPos();
}
}
else if (ed.curGrip == Grip::START && e != l->startElement()) {
qDebug("LineSegment: move start anchor (not impl.)");
}