some clarity and testing out a better tooltip idea

This commit is contained in:
Chris Cochrun 2023-11-19 07:15:40 -06:00
parent 93ecded49c
commit 76ebefb6fb

View file

@ -423,6 +423,10 @@ Item {
onEditingFinished: showPassiveNotification(text) onEditingFinished: showPassiveNotification(text)
background: Presenter.TextBackground { background: Presenter.TextBackground {
control: songAudioField control: songAudioField
errorCondition: !song.audioExists
}
Controls.ToolTip {
text: song.audioExists ? "The audio that will be played for this song" : "The audio is missing or does not exists"
} }
} }
@ -492,6 +496,7 @@ Item {
songEditorModel.verticalTextAlignment = thisSong.verticalTextAlignment; songEditorModel.verticalTextAlignment = thisSong.verticalTextAlignment;
songEditorModel.font = thisSong.font; songEditorModel.font = thisSong.font;
songEditorModel.fontSize = thisSong.fontSize; songEditorModel.fontSize = thisSong.fontSize;
songEditorModel.checkFiles();
songID = thisSong.id; songID = thisSong.id;
updateHorizontalTextAlignment("Center"); updateHorizontalTextAlignment("Center");
@ -515,19 +520,20 @@ Item {
clearSlides(); clearSlides();
const updatedSong = songProxyModel.getSong(index); const updatedSong = songProxyModel.getSong(index);
console.log(updatedSong.vorder + " " + updatedSong.title + " " + updatedSong.audio); console.log(updatedSong.vorder + " " + updatedSong.title + " " + updatedSong.audio);
song.title = updatedSong.title; songEditorModel.title = updatedSong.title;
song.lyrics = updatedSong.lyrics; songEditorModel.lyrics = updatedSong.lyrics;
song.author = updatedSong.author; songEditorModel.author = updatedSong.author;
song.ccli = updatedSong.ccli; songEditorModel.ccli = updatedSong.ccli;
song.audio = updatedSong.audio; songEditorModel.audio = updatedSong.audio;
song.verseOrder = updatedSong.vorder; songEditorModel.verseOrder = updatedSong.vorder;
song.background = updatedSong.background; songEditorModel.background = updatedSong.background;
song.backgroundType = updatedSong.backgroundType; songEditorModel.backgroundType = updatedSong.backgroundType;
song.horizontalTextAlignment = updatedSong.horizontalTextAlignment; songEditorModel.horizontalTextAlignment = updatedSong.horizontalTextAlignment;
song.verticalTextAlignment = updatedSong.verticalTextAlignment; songEditorModel.verticalTextAlignment = updatedSong.verticalTextAlignment;
song.font = updatedSong.font; songEditorModel.font = updatedSong.font;
song.fontSize = updatedSong.fontSize; songEditorModel.fontSize = updatedSong.fontSize;
song.checkVerseOrder(); songEditorModel.checkVerseOrder();
songEditorModel.checkFiles();
songID = updatedSong.id; songID = updatedSong.id;
changeSlideHAlignment(song.horizontalTextAlignment); changeSlideHAlignment(song.horizontalTextAlignment);
@ -574,8 +580,9 @@ Item {
function updateAudioFile() { function updateAudioFile() {
const file = fileHelper.loadFile("Pick Audio", "audio"); const file = fileHelper.loadFile("Pick Audio", "audio");
songEditorModel.audio = file songEditorModel.audio = file;
songProxyModel.songModel.updateAudio(songID, file); songProxyModel.songModel.updateAudio(songID, file);
songEditorModel.checkFiles();
} }
function updateBackground(backgroundType) { function updateBackground(backgroundType) {