From 50fc74533530f2c19e8f6866c67dc455c2a6de4b Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Tue, 17 Sep 2024 06:24:28 -0500 Subject: [PATCH] add the song_editor's embedded song_model and use it --- src/qml/presenter/MainWindow.qml | 2 +- src/qml/presenter/SongEditor.qml | 25 +++++++++++++------------ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/qml/presenter/MainWindow.qml b/src/qml/presenter/MainWindow.qml index b1201dd..17034ba 100644 --- a/src/qml/presenter/MainWindow.qml +++ b/src/qml/presenter/MainWindow.qml @@ -200,7 +200,7 @@ Controls.Page { /* SlideHelper { id: slideHelper } */ SongEditor { id: songEditorModel - /* songModel: songProxyModel.songModel() */ + songModel: songModel } Connections { diff --git a/src/qml/presenter/SongEditor.qml b/src/qml/presenter/SongEditor.qml index 52481be..5a09393 100644 --- a/src/qml/presenter/SongEditor.qml +++ b/src/qml/presenter/SongEditor.qml @@ -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;