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) {
|
function updateLyrics(lyrics) {
|
||||||
songsqlmodel.updateLyrics(songIndex, lyrics);
|
songsqlmodel.updateLyrics(songIndex, lyrics);
|
||||||
songLyrics = lyrics;
|
songLyrics = lyrics;
|
||||||
/* print(lyrics); */
|
clearSlides();
|
||||||
changeSlideText(song.id - 1);
|
changeSlideText(song.id - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -158,7 +158,7 @@ QStringList SongSqlModel::getLyricList(const int &row) {
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList rawLyrics = recordData.value("lyrics").toString().split("\n");
|
QStringList rawLyrics = recordData.value("lyrics").toString().split("\n");
|
||||||
qDebug() << rawLyrics;
|
qDebug() << "HERE ARE RAW LYRICS: " << rawLyrics;
|
||||||
QStringList lyrics;
|
QStringList lyrics;
|
||||||
|
|
||||||
QStringList vorder = recordData.value("vorder").toString().split(" ");
|
QStringList vorder = recordData.value("vorder").toString().split(" ");
|
||||||
|
@ -194,7 +194,7 @@ QStringList SongSqlModel::getLyricList(const int &row) {
|
||||||
// qDebug() << line;
|
// qDebug() << line;
|
||||||
if (verse.contains("\n\n")) {
|
if (verse.contains("\n\n")) {
|
||||||
verse = verse.trimmed();
|
verse = verse.trimmed();
|
||||||
// qDebug() << "THIS IS A EMPTY SLIDE!" << verse;
|
qDebug() << "THIS IS A EMPTY SLIDE!" << verse;
|
||||||
QStringList multiverses = verse.split("\n\n");
|
QStringList multiverses = verse.split("\n\n");
|
||||||
foreach (verse, multiverses) {
|
foreach (verse, multiverses) {
|
||||||
verses.insert(vtitle, verse);
|
verses.insert(vtitle, verse);
|
||||||
|
@ -211,6 +211,19 @@ QStringList SongSqlModel::getLyricList(const int &row) {
|
||||||
continue;
|
continue;
|
||||||
} else if (rawLyrics.endsWith(line)) {
|
} else if (rawLyrics.endsWith(line)) {
|
||||||
// qDebug() << vtitle;
|
// 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");
|
verse.append(line.trimmed() + "\n");
|
||||||
verses.insert(vtitle, verse);
|
verses.insert(vtitle, verse);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue