forge
Explore
Log in

Don't you dare go Hollow

The transport clock reads the preview while one is up

Browse files at this commit

a7406dafe2b1b9aaa900be5df6d078fe7f41baa0Ahmet Kaan GümüşParent: ee438f4c60633d
  • fix
    • the transport clock reads the preview while one is up
Show full message
🐛 fix(app): the transport clock reads the preview while one is up
crates/app/src/render.rsmodified+1 -6
@@ -687,12 +687,7 @@ impl Render for Player {
687687 .child(height_probe(self.notice_h.clone())),
688688 ),
689689 )
690- .child(self.transport_bar(
691- position,
692- state,
693- window.viewport_size(),
694- cx,
695- )),
690+ .child(self.transport_bar(state, window.viewport_size(), cx)),
696691 )
697692 .child(divider(Split::Inspector, cx))
698693 // The settings cards live in here rather than over the
crates/app/src/ui/toolbar.rsmodified+6 -5
@@ -148,7 +148,6 @@ impl Player {
148148 /// and the reason the edit toolbar below is nothing but edit tools.
149149 pub(crate) fn transport_bar(
150150 &self,
151- position: f64,
152151 state: Transport,
153152 viewport: Size<Pixels>,
154153 cx: &mut Context<Self>,
@@ -209,12 +208,14 @@ impl Player {
209208 .text_color(rgb(FG_PRIMARY()))
210209 .child(format!(
211210 "{} / {}",
212- timecode(position, self.fps),
213211 timecode(
214- self.session
215- .as_ref()
212+ self.active_session().map_or(0., PlaybackSession::now),
213+ self.active_fps()
214+ ),
215+ timecode(
216+ self.active_session()
216217 .map_or(0., PlaybackSession::timeline_duration),
217- self.fps
218+ self.active_fps()
218219 )
219220 )),
220221 )