From 175b327c5ca3c5a7a142351a2e0ce963ac743b43 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Mon, 20 Mar 2023 11:38:07 -0500 Subject: [PATCH] refocus the presentation item This command sets the keyboard focus to the presentation item which controls when slides are changed. It ensures that after every action you can use the arrow keys to switch the slides. --- src/qml/presenter/MainWindow.qml | 9 +++++++-- src/qml/presenter/ServiceList.qml | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/qml/presenter/MainWindow.qml b/src/qml/presenter/MainWindow.qml index 6f48999..de3558a 100644 --- a/src/qml/presenter/MainWindow.qml +++ b/src/qml/presenter/MainWindow.qml @@ -241,9 +241,9 @@ Controls.Page { imageEditor.visible = false; presentationEditor.visible = false; presentation.visible = true; - presentation.focusTimer = true; currentWindow = presentation; editMode = false; + refocusPresentation(); } } else { videoEditor.visible = false; @@ -252,10 +252,10 @@ Controls.Page { imageEditor.visible = false; presentationEditor.visible = false; presentation.visible = true; - presentation.focusTimer = true; currentWindow = presentation; editMode = false; presenting = true; + refocusPresentation(); } } @@ -276,4 +276,9 @@ Controls.Page { presentation.slide.seek(pos); pWindow.slide.seek(pos); } + + function refocusPresentation() { + presentation.forceActiveFocus(); + presentation.focusTimer = true; + } } diff --git a/src/qml/presenter/ServiceList.qml b/src/qml/presenter/ServiceList.qml index 8700323..d46ce90 100644 --- a/src/qml/presenter/ServiceList.qml +++ b/src/qml/presenter/ServiceList.qml @@ -250,6 +250,7 @@ Item { serviceItemList.currentIndex = index; ServiceItemModel.select(index); } + refocusPresentation(); } onDoubleClicked: {