From 4fd5039e66f5a0a58b48a44afbac80fb4a50d682 Mon Sep 17 00:00:00 2001 From: Vic <10308169+VictoriousRaptor@users.noreply.github.com> Date: Mon, 19 Dec 2022 00:37:02 +0800 Subject: [PATCH] Fix item can't be unselected after editing shortcut --- Flow.Launcher/ViewModel/SettingWindowViewModel.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs index a97a328e6..f160c2e04 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -775,8 +775,11 @@ namespace Flow.Launcher.ViewModel var shortcutSettingWindow = new CustomShortcutSetting(item.Key, item.Value, this); if (shortcutSettingWindow.ShowDialog() == true) { + // https://stackoverflow.com/questions/16789360/wpf-listbox-items-with-changing-hashcode + SelectedCustomShortcut = null; item.Key = shortcutSettingWindow.Key; item.Value = shortcutSettingWindow.Value; + SelectedCustomShortcut = item; return true; } return false;