Merge pull request #10709 from Jojo-Schmitz/extract-lyrics-above-too

[MU4] "Copy lyrics to clipboard" should extract lyrics above staff too
This commit is contained in:
RomanPudashkin 2023-04-26 14:18:58 +03:00 committed by GitHub
commit 8507226467
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 2 deletions

View file

@ -1117,6 +1117,16 @@ Shape ChordRest::shape() const
// lyrics
//---------------------------------------------------------
Lyrics* ChordRest::lyrics(int no) const
{
for (Lyrics* l : _lyrics) {
if (l->no() == no) {
return l;
}
}
return 0;
}
Lyrics* ChordRest::lyrics(int no, PlacementV p) const
{
for (Lyrics* l : _lyrics) {

View file

@ -158,6 +158,7 @@ public:
const std::vector<Lyrics*>& lyrics() const { return _lyrics; }
std::vector<Lyrics*>& lyrics() { return _lyrics; }
Lyrics* lyrics(int verse) const;
Lyrics* lyrics(int verse, PlacementV) const;
int lastVerse(PlacementV) const;
bool isMelismaEnd() const;

View file

@ -5017,7 +5017,7 @@ String Score::extractLyrics()
if (playCount >= int(cr->lyrics().size())) {
continue;
}
Lyrics* l = cr->lyrics(playCount, PlacementV::BELOW); // TODO: ABOVE
Lyrics* l = cr->lyrics(playCount);
if (!l) {
continue;
}
@ -5052,7 +5052,7 @@ String Score::extractLyrics()
if (lyricsNumber >= cr->lyrics().size()) {
continue;
}
Lyrics* l = cr->lyrics(lyricsNumber, PlacementV::BELOW); // TODO
Lyrics* l = cr->lyrics(lyricsNumber);
if (!l) {
continue;
}