A preview shows neither the timeline's captions nor its hints
Browse files at this commit490cfd3072f02ae51b760110a6ccd905f339987cParent: a7406da- fix
- a preview shows neither the timeline's captions nor its hints
2 changed files +4 -2
crates/app/src/render.rsmodified+1 -2
| @@ -648,8 +648,7 @@ impl Render for Player { | |||
| 648 | // what it wants instead. The window | 648 | // what it wants instead. The window |
| 649 | // is already the drop target. | 649 | // is already the drop target. |
| 650 | .or_else(|| { | 650 | .or_else(|| { |
| 651 | - self.session | 651 | + (self.active_session().is_none()) |
| 652 | - .is_none() | ||
| 653 | .then(|| empty_hint().into_any_element()) | 652 | .then(|| empty_hint().into_any_element()) |
| 654 | }), | 653 | }), |
| 655 | ) | 654 | ) |
crates/app/src/ui/preview.rsmodified+3 -0
| @@ -120,6 +120,9 @@ impl Player { | |||
| 120 | let shown: Option<(Lane, Vec<engine::subtitle::Cue>)> = self | 120 | let shown: Option<(Lane, Vec<engine::subtitle::Cue>)> = self |
| 121 | .active_sub_lane() | 121 | .active_sub_lane() |
| 122 | .filter(|_| self.subs_on) | 122 | .filter(|_| self.subs_on) |
| 123 | + // A preview is another file: the timeline's words over its | ||
| 124 | + // picture would caption the wrong film. | ||
| 125 | + .filter(|_| self.preview_session.is_none()) | ||
| 123 | .and_then(|lane| { | 126 | .and_then(|lane| { |
| 124 | let cues = self.session.as_ref()?.sub_lane_cues(lane); | 127 | let cues = self.session.as_ref()?.sub_lane_cues(lane); |
| 125 | let now: Vec<_> = cues_at(&cues, at).into_iter().cloned().collect(); | 128 | let now: Vec<_> = cues_at(&cues, at).into_iter().cloned().collect(); |