From 11608e6e2cbaa16ba84b4df749f33335511de541 Mon Sep 17 00:00:00 2001 From: Charles Ewert Date: Sat, 11 Nov 2023 20:25:22 -0500 Subject: [PATCH] fix bug with photos not working from itemgrid --- components/ItemGrid/ItemGrid.bs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/components/ItemGrid/ItemGrid.bs b/components/ItemGrid/ItemGrid.bs index 2d911200..ce531c28 100644 --- a/components/ItemGrid/ItemGrid.bs +++ b/components/ItemGrid/ItemGrid.bs @@ -801,14 +801,11 @@ function onKeyEvent(key as string, press as boolean) as boolean m.loadItemsTask.control = "stop" return true end if - else if key = "play" + else if key = "OK" markupGrid = m.top.findNode("itemGrid") itemToPlay = getItemFocused() - if itemToPlay <> invalid - m.top.quickPlayNode = itemToPlay - return true - else if itemToPlay <> invalid and itemToPlay.type = "Photo" + if itemToPlay <> invalid and itemToPlay.type = "Photo" ' Spawn photo player task photoPlayer = CreateObject("roSgNode", "PhotoDetails") photoPlayer.items = markupGrid @@ -816,6 +813,13 @@ function onKeyEvent(key as string, press as boolean) as boolean m.global.sceneManager.callfunc("pushScene", photoPlayer) return true end if + else if key = "play" + itemToPlay = getItemFocused() + + if itemToPlay <> invalid + m.top.quickPlayNode = itemToPlay + return true + end if else if key = "left" and topGrp.isinFocusChain() m.top.alphaActive = true topGrp.setFocus(false)