add the song_editor's embedded song_model and use it

This commit is contained in:
Chris Cochrun 2024-09-17 06:24:28 -05:00
parent 273dd76d23
commit 50fc745335
2 changed files with 14 additions and 13 deletions

View file

@ -200,7 +200,7 @@ Controls.Page {
/* SlideHelper { id: slideHelper } */
SongEditor {
id: songEditorModel
/* songModel: songProxyModel.songModel() */
songModel: songModel
}
Connections {

View file

@ -497,18 +497,19 @@ Item {
clearSlides();
const updatedSong = songModel.getItem(index);
Utils.dbg(updatedSong.vorder + " " + updatedSong.title + " " + updatedSong.audio);
songEditorModel.title = updatedSong.title;
songEditorModel.lyrics = updatedSong.lyrics;
songEditorModel.author = updatedSong.author;
songEditorModel.ccli = updatedSong.ccli;
songEditorModel.audio = updatedSong.audio;
songEditorModel.verseOrder = updatedSong.vorder;
songEditorModel.background = updatedSong.background;
songEditorModel.backgroundType = updatedSong.backgroundType;
songEditorModel.horizontalTextAlignment = updatedSong.horizontalTextAlignment;
songEditorModel.verticalTextAlignment = updatedSong.verticalTextAlignment;
songEditorModel.font = updatedSong.font;
songEditorModel.fontSize = updatedSong.fontSize;
/* songEditorModel.title = updatedSong.title; */
/* songEditorModel.lyrics = updatedSong.lyrics; */
/* songEditorModel.author = updatedSong.author; */
/* songEditorModel.ccli = updatedSong.ccli; */
/* songEditorModel.audio = updatedSong.audio; */
/* songEditorModel.verseOrder = updatedSong.vorder; */
/* songEditorModel.background = updatedSong.background; */
/* songEditorModel.backgroundType = updatedSong.backgroundType; */
/* songEditorModel.horizontalTextAlignment = updatedSong.horizontalTextAlignment; */
/* songEditorModel.verticalTextAlignment = updatedSong.verticalTextAlignment; */
/* songEditorModel.font = updatedSong.font; */
/* songEditorModel.fontSize = updatedSong.fontSize; */
songEditorModel.loadSong(index);
songEditorModel.checkVerseOrder();
songEditorModel.checkFiles();
songID = updatedSong.id;