diff --git a/src/qml/presenter/LibraryItem.qml b/src/qml/presenter/LibraryItem.qml index d2cdd69..2918c59 100644 --- a/src/qml/presenter/LibraryItem.qml +++ b/src/qml/presenter/LibraryItem.qml @@ -348,10 +348,10 @@ ColumnLayout { id: clickHandler anchors.fill: parent acceptedButtons: Qt.LeftButton | Qt.RightButton - onClicked: { + onClicked: (mouse) => { if (mouse.button === Qt.RightButton) { if(selectionModel.selectedIndexes.length <= 1) - selectionModel.select(innerModel.index(index), + selectionModel.select(innerModel.index(index, 0), ItemSelectionModel.ClearAndSelect); rightClickMenu.popup() } @@ -359,19 +359,19 @@ ColumnLayout { (mouse.modifiers === Qt.ShiftModifier)) { if (libraryList.currentIndex < index) { for (let i = libraryList.currentIndex; i <= index; i++) { - selectionModel.select(innerModel.index(i), + selectionModel.select(innerModel.index(i, 0), ItemSelectionModel.Select); } } else { for (let i = index; i <= libraryList.currentIndex; i++) { - selectionModel.select(innerModel.index(i), + selectionModel.select(innerModel.index(i, 0), ItemSelectionModel.Select); } } console.log(selectionModel.selectedIndexes); } else { - selectionModel.select(innerModel.index(index), + selectionModel.select(innerModel.index(index, 0), ItemSelectionModel.ClearAndSelect); libraryList.currentIndex = index; } diff --git a/src/qml/presenter/SongEditor.qml b/src/qml/presenter/SongEditor.qml index 45dcedc..52481be 100644 --- a/src/qml/presenter/SongEditor.qml +++ b/src/qml/presenter/SongEditor.qml @@ -482,7 +482,7 @@ Item { Utils.dbg("Changing Lyrics"); /* songEditorModel.lyrics = lyricsEditor.text; */ /* showPassiveNotification("Lyrics changed"); */ - songProxyModel.songModel.updateLyrics(songID, lyricsEditor.text); + songModel.updateLyrics(songID, lyricsEditor.text); clearSlides(); changeSlideText(songID); Utils.dbg("Lyrics changed"); @@ -492,10 +492,10 @@ Item { } function changeSong(index) { - Utils.dbg("Preparing to change song: " + index + 1 + " out of " + songProxyModel.songModel.count); + Utils.dbg("Preparing to change song: " + index + 1 + " out of " + songModel.count); editorTimer.running = false; clearSlides(); - const updatedSong = songProxyModel.songModel.getItem(index); + const updatedSong = songModel.getItem(index); Utils.dbg(updatedSong.vorder + " " + updatedSong.title + " " + updatedSong.audio); songEditorModel.title = updatedSong.title; songEditorModel.lyrics = updatedSong.lyrics; @@ -531,31 +531,31 @@ Item { } /* function updateLyrics(lyrics) { */ - /* songProxyModel.songModel.updateLyrics(songID, lyrics); */ + /* songModel.updateLyrics(songID, lyrics); */ /* /\* songLyrics = lyrics; *\/ */ /* clearSlides(); */ /* changeSlideText(songID); */ /* } */ function updateTitle(title) { - songProxyModel.songModel.updateTitle(songID, title) + songModel.updateTitle(songID, title) song.title = title; } function updateAuthor(author) { - songProxyModel.songModel.updateAuthor(songID, author) + songModel.updateAuthor(songID, author) } function updateAudio(audio) { - songProxyModel.songModel.updateAudio(songID, audio) + songModel.updateAudio(songID, audio) } function updateCcli(ccli) { - songProxyModel.songModel.updateCcli(songID, ccli) + songModel.updateCcli(songID, ccli) } function updateVerseOrder(vorder) { - songProxyModel.songModel.updateVerseOrder(songID, vorder) + songModel.updateVerseOrder(songID, vorder) songEditorModel.verseOrder = vorder; songEditorModel.checkVerseOrder(); } @@ -565,7 +565,7 @@ Item { Utils.dbg("song: " + songID); Utils.dbg("song-title: " + songEditorModel.title) songEditorModel.audio = file; - songProxyModel.songModel.updateAudio(songID, file); + songModel.updateAudio(songID, file); songEditorModel.checkFiles(); } @@ -573,32 +573,32 @@ Item { songEditorModel.backgroundType = backgroundType; const file = fileHelper.loadFile("Pick Background", backgroundType); songEditorModel.background = file; - songProxyModel.songModel.updateBackground(songID, file); - songProxyModel.songModel.updateBackgroundType(songID, backgroundType); + songModel.updateBackground(songID, file); + songModel.updateBackgroundType(songID, backgroundType); Utils.dbg("changed background"); } function updateHorizontalTextAlignment(textAlignment) { changeSlideHAlignment(textAlignment); - songProxyModel.songModel.updateHorizontalTextAlignment(songID, textAlignment); + songModel.updateHorizontalTextAlignment(songID, textAlignment); } function updateVerticalTextAlignment(textAlignment) { changeSlideVAlignment(textAlignment); - songProxyModel.songModel.updateVerticalTextAlignment(songID, textAlignment) + songModel.updateVerticalTextAlignment(songID, textAlignment) } function updateFont(font) { showPassiveNotification(font); changeSlideFont(font, false); - songProxyModel.songModel.updateFont(songID, font); + songModel.updateFont(songID, font); song.font = font; } function updateFontSize(fontSize) { changeSlideFontSize(fontSize, false); - songProxyModel.songModel.updateFontSize(songID, fontSize); + songModel.updateFontSize(songID, fontSize); song.fontSize = fontSize; } @@ -654,7 +654,7 @@ Item { } function changeSlideText(id) { - const verses = songProxyModel.songModel.getLyricList(id); + const verses = songModel.getLyricList(id); verses.forEach(songList.appendVerse); /* songList.loadVideo(); */ }