From a0488c537c2b76c130ed119c6e239dfb5adf7907 Mon Sep 17 00:00:00 2001 From: nathaniel Date: Thu, 1 Feb 2024 13:35:49 -0500 Subject: [PATCH] Fix training dashboard metrics switch --- burn-train/src/renderer/tui/metric_numeric.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/burn-train/src/renderer/tui/metric_numeric.rs b/burn-train/src/renderer/tui/metric_numeric.rs index f124fe3cce..eb44a29d6d 100644 --- a/burn-train/src/renderer/tui/metric_numeric.rs +++ b/burn-train/src/renderer/tui/metric_numeric.rs @@ -109,7 +109,10 @@ impl NumericMetricsState { if let Event::Key(key) = event { match key.kind { KeyEventKind::Release | KeyEventKind::Repeat => (), + #[cfg(target_os = "windows")] // Fix the double toggle on Windows. KeyEventKind::Press => return, + #[cfg(not(target_os = "windows"))] + KeyEventKind::Press => (), } match key.code { KeyCode::Right => self.next_metric(),