fix #51406: Time & key signatures deleted on range delete, corrupting score

This commit is contained in:
lasconic 2015-03-19 15:07:50 +01:00
parent df0d65c344
commit a964fba36e
2 changed files with 6 additions and 1 deletions

View file

@ -1965,7 +1965,10 @@ void Score::cmdDeleteSelection()
if (!e)
continue;
if (s->segmentType() != Segment::Type::ChordRest) {
undoRemoveElement(e);
// do not delete TimeSig/KeySig,
// it doesn't make sense to do it, except on full system
if (s->segmentType() != Segment::Type::TimeSig && s->segmentType() != Segment::Type::KeySig)
undoRemoveElement(e);
continue;
}
ChordRest* cr = static_cast<ChordRest*>(e);

View file

@ -470,6 +470,8 @@ void Selection::updateSelectedElements()
continue;
if (e->type() == Element::Type::TIMESIG)
continue;
if (e->type() == Element::Type::KEYSIG)
continue;
if (e->isChordRest()) {
ChordRest* cr = static_cast<ChordRest*>(e);
for (Element* e : cr->lyricsList()) {