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 } */ /* SlideHelper { id: slideHelper } */
SongEditor { SongEditor {
id: songEditorModel id: songEditorModel
/* songModel: songProxyModel.songModel() */ songModel: songModel
} }
Connections { Connections {

View file

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