From 948f0ee6fe596e94c1413054973166671ce297a2 Mon Sep 17 00:00:00 2001 From: maotovisk Date: Mon, 21 Sep 2026 09:11:58 -0300 Subject: [PATCH] fix: hs editor bindings --- .../HitSoundVisualizer/HitSoundVisualizerView.axaml.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/MapWizard.Desktop/Views/HitSoundVisualizer/HitSoundVisualizerView.axaml.cs b/MapWizard.Desktop/Views/HitSoundVisualizer/HitSoundVisualizerView.axaml.cs index 5393326..8459bd1 100644 --- a/MapWizard.Desktop/Views/HitSoundVisualizer/HitSoundVisualizerView.axaml.cs +++ b/MapWizard.Desktop/Views/HitSoundVisualizer/HitSoundVisualizerView.axaml.cs @@ -25,6 +25,13 @@ public HitSoundVisualizerView() if (DataContext is HitSoundVisualizerViewModel vm) { vm.RefreshPersistedPlaybackVolumes(); + // Re-bind on every attach. Detaching (page warm-up, navigating + // away) runs BindViewModel(null) and drops the VM event + // subscriptions; re-entering the page does not raise + // DataContextChanged because the page VM is a singleton, so the + // subscriptions must be restored here or row flashes and + // playback focus silently stop working. + BindViewModel(vm); } }; DetachedFromVisualTree += (_, _) => BindViewModel(null);