fixing a bug in the getLyricList command and clear on lyric edits
This commit is contained in:
parent
8cae86aeba
commit
4954f108a6
2 changed files with 16 additions and 3 deletions
|
@ -304,7 +304,7 @@ Item {
|
|||
function updateLyrics(lyrics) {
|
||||
songsqlmodel.updateLyrics(songIndex, lyrics);
|
||||
songLyrics = lyrics;
|
||||
/* print(lyrics); */
|
||||
clearSlides();
|
||||
changeSlideText(song.id - 1);
|
||||
}
|
||||
|
||||
|
|
|
@ -158,7 +158,7 @@ QStringList SongSqlModel::getLyricList(const int &row) {
|
|||
}
|
||||
|
||||
QStringList rawLyrics = recordData.value("lyrics").toString().split("\n");
|
||||
qDebug() << rawLyrics;
|
||||
qDebug() << "HERE ARE RAW LYRICS: " << rawLyrics;
|
||||
QStringList lyrics;
|
||||
|
||||
QStringList vorder = recordData.value("vorder").toString().split(" ");
|
||||
|
@ -194,7 +194,7 @@ QStringList SongSqlModel::getLyricList(const int &row) {
|
|||
// qDebug() << line;
|
||||
if (verse.contains("\n\n")) {
|
||||
verse = verse.trimmed();
|
||||
// qDebug() << "THIS IS A EMPTY SLIDE!" << verse;
|
||||
qDebug() << "THIS IS A EMPTY SLIDE!" << verse;
|
||||
QStringList multiverses = verse.split("\n\n");
|
||||
foreach (verse, multiverses) {
|
||||
verses.insert(vtitle, verse);
|
||||
|
@ -211,6 +211,19 @@ QStringList SongSqlModel::getLyricList(const int &row) {
|
|||
continue;
|
||||
} else if (rawLyrics.endsWith(line)) {
|
||||
// qDebug() << vtitle;
|
||||
|
||||
verse.append(line.trimmed() + "\n");
|
||||
if (verse.contains("\n\n")) {
|
||||
verse = verse.trimmed();
|
||||
qDebug() << "THIS IS A EMPTY SLIDE!" << verse;
|
||||
QStringList multiverses = verse.split("\n\n");
|
||||
foreach (verse, multiverses) {
|
||||
verses.insert(vtitle, verse);
|
||||
// qDebug() << verse;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
verse.append(line.trimmed() + "\n");
|
||||
verses.insert(vtitle, verse);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue