fix #100626: crash on copy that removes slur

This commit is contained in:
Marc Sabatella 2016-03-04 12:03:59 -07:00
parent a6ec8aa170
commit 51ed847ac7

View file

@ -505,9 +505,12 @@ void Selection::updateSelectedElements()
if (sp->type() == Element::Type::VOLTA)
continue;
if (sp->type() == Element::Type::SLUR) {
if ((sp->tick() >= stick && sp->tick() < etick) || (sp->tick2() >= stick && sp->tick2() < etick))
if (canSelect(sp->startCR()) && canSelect(sp->endCR()))
appendFiltered(sp); // slur with start or end in range selection
// ignore if start & end elements not calculated yet
if (!sp->startElement() || !sp->endElement())
continue;
if ((sp->tick() >= stick && sp->tick() < etick) || (sp->tick2() >= stick && sp->tick2() < etick))
if (canSelect(sp->startCR()) && canSelect(sp->endCR()))
appendFiltered(sp); // slur with start or end in range selection
}
else if ((sp->tick() >= stick && sp->tick() < etick) && (sp->tick2() >= stick && sp->tick2() <= etick))
appendFiltered(sp); // spanner with start and end in range selection