From 91158ebf72696ca2ba7a951e934a1cb259e9347b Mon Sep 17 00:00:00 2001 From: maj00r Date: Wed, 11 Nov 2026 18:05:45 +0100 Subject: [PATCH] fix(tapes): the moment asked while a file is read goes to the window still open, not one closed meanwhile --- StarterNG/Views/Tapes/HaslerTapeWindow.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/StarterNG/Views/Tapes/HaslerTapeWindow.cs b/StarterNG/Views/Tapes/HaslerTapeWindow.cs index 90adf8a..bfa1ecf 100644 --- a/StarterNG/Views/Tapes/HaslerTapeWindow.cs +++ b/StarterNG/Views/Tapes/HaslerTapeWindow.cs @@ -457,8 +457,9 @@ public sealed class HaslerTapeWindow : Window }; window.Show(this); await window.OpenAsync(box.Path); - // The last moment asked for while the file was read. - if (_wantedAt.Remove(box.Path, out double wanted)) + // The last moment asked for while the file was read; not a window closed meanwhile, whose file another reads. + if (_blackBoxes.TryGetValue(box.Path, out var current) && current == window + && _wantedAt.Remove(box.Path, out double wanted)) window.SeekTo(wanted); }