From b4c09a6700ed8ab746ba1de4785e7d305c82d210 Mon Sep 17 00:00:00 2001 From: Neil Burrows Date: Sat, 12 Jun 2021 16:30:32 +0100 Subject: [PATCH] Fix incorrect selection when pressing back in subtitle dialog --- source/Main.brs | 2 +- source/utils/Subtitles.brs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/Main.brs b/source/Main.brs index b0453bea..07aa5c33 100644 --- a/source/Main.brs +++ b/source/Main.brs @@ -382,7 +382,7 @@ function Main (args as Dynamic) as Void node = m.scene.focusedChild if node.isSubType("JFVideo") then trackSelected = selectSubtitleTrack(node.Subtitles, node.SelectedSubtitle) - if trackSelected <> invalid then + if trackSelected <> invalid and trackSelected <> -2 then changeSubtitleDuringPlayback(trackSelected) end if end if diff --git a/source/utils/Subtitles.brs b/source/utils/Subtitles.brs index 91221430..2ca09e5d 100644 --- a/source/utils/Subtitles.brs +++ b/source/utils/Subtitles.brs @@ -2,8 +2,8 @@ function selectSubtitleTrack(tracks, current = -1) as integer video = m.scene.focusedChild trackSelected = selectSubtitleTrackDialog(video.Subtitles, video.SelectedSubtitle) - if trackSelected = invalid or trackSelected = -1 then - return invalid + if trackSelected = invalid or tackSelected = -1 then ' back pressed in Dialog - no selection made + return -2 else return trackSelected - 1 end if