fix #275688 Be able to add lyrics on a rest

This commit is contained in:
ws 2018-11-05 10:10:33 +01:00
parent 536ff70343
commit cbeb02b3fa

View file

@ -2321,7 +2321,7 @@ void Score::cmdFullMeasureRest()
Lyrics* Score::addLyrics()
{
Element* el = selection().element();
if (el == 0 || (!el->isNote() && !el->isLyrics())) {
if (el == 0 || (!el->isNote() && !el->isLyrics() && !el->isRest())) {
MScore::setError(NO_LYRICS_SELECTED);
return 0;
}
@ -2333,6 +2333,8 @@ Lyrics* Score::addLyrics()
}
else if (el->isLyrics())
cr = toLyrics(el)->chordRest();
else if (el->isRest())
cr = toChordRest(el);
else
return 0;