diff --git a/TODO.org b/TODO.org index 3c6d1d6..6a25957 100644 --- a/TODO.org +++ b/TODO.org @@ -4,8 +4,6 @@ :END: * Inbox -** DONE Need to make =getLyricList= give back the verses with empty lines as separate slides :core: -[[file:~/dev/church-presenter/src/songsqlmodel.cpp:://TODO make sure to split empty line in verse into two slides]] ** TODO VideoSQL Model and SQLite system needs fixing [[file:src/videosqlmodel.cpp::if (!query.exec("CREATE TABLE IF NOT EXISTS 'videos' ("]] @@ -13,9 +11,13 @@ [[file:~/dev/church-presenter/src/qml/presenter/SongEditor.qml::Presenter.SlideEditor {]] - [X] Initial ListView with text coming from =getLyricList= -- [ ] Depending on this [[*Need to make getLyricList give back the verses with empty lines as separate slides][Need to make getLyricList give back the verses with empty lines as separate slides]] +- [X] Depending on this [[*Need to make getLyricList give back the verses with empty lines as separate slides][Need to make getLyricList give back the verses with empty lines as separate slides]] - [ ] Need to perhaps address the MPV crashing problem for a smoother experience. - Essentially, mpv objects cause a seg fault when we remove them from the qml graph scene and are somehow re-referencing them. Using =reuseItems=, I can prevent the seg fault but then we are storing a lot of things in memory and will definitely cause slowdowns on older hardware. + Essentially, mpv objects cause a seg fault when we remove them from the qml graph scene and are somehow re-referencing them. Using =reuseItems=, I can prevent the seg fault but then we are storing a lot of things in memory and will definitely cause slowdowns on older hardware. So far I haven't seen too many problems with the =reuseItems= piece yet. + + Apparently, I still have crashing + +- [X] There is also a small hiccup in switching between songs. I appears as if songs that don't have any slides will have ghost slides from the previously selected song. ** WAIT Make toolbar functional for =songeditor= [3/4] [75%] :core: [[file:~/dev/church-presenter/src/qml/presenter/SongEditor.qml::Controls.ToolBar {]] @@ -71,6 +73,8 @@ This thread helped a lot ** DONE Fix bug in not removing old slides in the SongEditor when switching songs from the Library :bug: +** DONE Need to make =getLyricList= give back the verses with empty lines as separate slides :core: +[[file:~/dev/church-presenter/src/songsqlmodel.cpp:://TODO make sure to split empty line in verse into two slides]] ** DONE bug in changing slides with the arrows :core: [[file:~/dev/church-presenter/src/qml/presenter/Presentation.qml::function changeSlide() {]] diff --git a/src/qml/presenter/SlideEditor.qml b/src/qml/presenter/SlideEditor.qml index 8859aa8..bb42742 100644 --- a/src/qml/presenter/SlideEditor.qml +++ b/src/qml/presenter/SlideEditor.qml @@ -21,6 +21,7 @@ Item { property bool playingVideo: false property ListModel songs: songModel + property ListView songSlides: slideList property var firstItem @@ -160,4 +161,5 @@ Item { print(slideList.currentItem); } } + } diff --git a/src/qml/presenter/SongEditor.qml b/src/qml/presenter/SongEditor.qml index 7eec79e..8f1fc5c 100644 --- a/src/qml/presenter/SongEditor.qml +++ b/src/qml/presenter/SongEditor.qml @@ -278,6 +278,7 @@ Item { } function changeSong(index) { + clearSlides(); const s = songsqlmodel.getSong(index); song = s; songLyrics = s.lyrics; @@ -420,9 +421,12 @@ Item { } function changeSlideText(id) { - const verses = songsqlmodel.getLyricList(id); /* print("Here are the verses: " + verses); */ - slideEditor.songs.clear() + const verses = songsqlmodel.getLyricList(id); verses.forEach(slideEditor.appendVerse); } + + function clearSlides() { + slideEditor.songs.clear() + } }