From 0eec89518db2c5ea59cbd48a499cd9bb58ecfc7f Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Sun, 5 Mar 2023 07:21:10 -0600 Subject: [PATCH] changePresentation works now This also now makes sure that when switching presentations in the editor we are jumping back to the beginning of the presentation rather than getting lost in the last held currentFrame. --- src/qml/presenter/PresentationEditor.qml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/qml/presenter/PresentationEditor.qml b/src/qml/presenter/PresentationEditor.qml index 2d9d94b..b5a8bc9 100644 --- a/src/qml/presenter/PresentationEditor.qml +++ b/src/qml/presenter/PresentationEditor.qml @@ -148,10 +148,12 @@ Item { } function changePresentation(presentation) { - root.presentation = presentation; - console.log(presentation.filePath.toString()); + let pres = presProxyModel.getPresentation(presentation); + root.presentation = pres; + console.log(pres.filePath.toString()); updatePageCount(presentationPreview.frameCount); - console.log("page count " + presentation.pageCount); + console.log("page count " + pres.pageCount); + presentationPreview.currentFrame = 0; } function updateTitle(text) {