fixing the crashes and maybe speed up loading of objects in slides

This commit is contained in:
Chris Cochrun 2022-09-07 13:32:36 -05:00
parent d5c050a333
commit e758958dca
4 changed files with 29 additions and 20 deletions

View file

@ -93,7 +93,7 @@ Item {
Timer {
id: pauseTimer
interval: 200
interval: 300
onTriggered: mpv.pause()
}

View file

@ -58,26 +58,28 @@ Item {
anchors.rightMargin: 20
model: songModel
clip: true
cacheBuffer: 900
cacheBuffer: 1900
reuseItems: true
spacing: Kirigami.Units.gridUnit
/* flickDeceleration: 4000 */
/* boundsMovement: Flickable.StopAtBounds */
synchronousDrag: true
delegate: Presenter.Slide {
id: representation
editMode: true
imageSource: root.imageBackground
videoSource: root.videoBackground
hTextAlignment: root.hTextAlignment
vTextAlignment: root.vTextAlignment
chosenFont: font
textSize: fontSize
preview: true
text: verse
implicitWidth: slideList.width
implicitHeight: width * 9 / 16
itemType: "song"
delegate: Loader {
width: slideList.width
height: width * 9 / 16
Presenter.Slide {
id: representation
editMode: true
imageSource: root.imageBackground
videoSource: root.videoBackground
hTextAlignment: root.hTextAlignment
vTextAlignment: root.vTextAlignment
chosenFont: font
textSize: fontSize
preview: true
text: verse
implicitWidth: slideList.width
implicitHeight: width * 9 / 16
itemType: "song"
}
}
Kirigami.WheelHandler {
@ -155,9 +157,10 @@ Item {
}
function loadVideo() {
showPassiveNotification("I'm loading the videos");
for (var i = 0; i < slideList.count; ++i) {
slideList.currentIndex = i;
slideList.currentItem.loadVideo();
slideList.currentItem.representation.loadVideo();
print(slideList.currentItem);
}
}

View file

@ -424,6 +424,7 @@ Item {
/* print("Here are the verses: " + verses); */
const verses = songsqlmodel.getLyricList(id);
verses.forEach(slideEditor.appendVerse);
/* slideEditor.loadVideo(); */
}
function clearSlides() {