Skip to content

Commit

Permalink
fix #51406: Time & key signatures deleted on range delete, corrupting…
Browse files Browse the repository at this point in the history
… score
  • Loading branch information
lasconic committed Mar 19, 2015
1 parent df0d65c commit a964fba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libmscore/edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions libmscore/select.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down

0 comments on commit a964fba

Please sign in to comment.