Merge pull request #511 from neilsb/subtitle-selection-fix
This commit is contained in:
commit
f66479d597
|
@ -265,7 +265,7 @@ sub Main (args as dynamic) as void
|
|||
end if
|
||||
else if isNodeEvent(msg, "selectSubtitlePressed")
|
||||
node = m.scene.focusedChild
|
||||
if node.isSubType("JFVideo")
|
||||
if node.focusedChild <> invalid and node.focusedChild.isSubType("JFVideo")
|
||||
trackSelected = selectSubtitleTrack(node.Subtitles, node.SelectedSubtitle)
|
||||
if trackSelected <> invalid and trackSelected <> -2
|
||||
changeSubtitleDuringPlayback(trackSelected)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
function selectSubtitleTrack(tracks, current = -1) as integer
|
||||
video = m.scene.focusedChild
|
||||
video = m.scene.focusedChild.focusedChild
|
||||
trackSelected = selectSubtitleTrackDialog(video.Subtitles, video.SelectedSubtitle)
|
||||
if trackSelected = invalid or trackSelected = -1 ' back pressed in Dialog - no selection made
|
||||
return -2
|
||||
|
@ -37,7 +37,7 @@ sub changeSubtitleDuringPlayback(newid)
|
|||
return
|
||||
end if
|
||||
|
||||
video = m.scene.focusedChild
|
||||
video = m.scene.focusedChild.focusedChild
|
||||
|
||||
' If no change of subtitle track, return
|
||||
if newid = video.SelectedSubtitle then return
|
||||
|
@ -74,7 +74,7 @@ sub changeSubtitleDuringPlayback(newid)
|
|||
end sub
|
||||
|
||||
sub turnoffSubtitles()
|
||||
video = m.scene.focusedChild
|
||||
video = m.scene.focusedChild.focusedChild
|
||||
current = video.SelectedSubtitle
|
||||
video.SelectedSubtitle = -1
|
||||
video.globalCaptionMode = "Off"
|
||||
|
|
Loading…
Reference in New Issue
Block a user