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 1/2] 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 a97a328e6fe..f160c2e040f 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -775,8 +775,11 @@ public bool EditSelectedCustomShortcut() 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; From ac1658fe040d4016ee55bbdb77caaa8fe9efb264 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Tue, 20 Dec 2022 21:15:30 +1100 Subject: [PATCH 2/2] add comment --- Flow.Launcher/ViewModel/SettingWindowViewModel.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs index f160c2e040f..c7c1aaa4070 100644 --- a/Flow.Launcher/ViewModel/SettingWindowViewModel.cs +++ b/Flow.Launcher/ViewModel/SettingWindowViewModel.cs @@ -775,6 +775,7 @@ public bool EditSelectedCustomShortcut() var shortcutSettingWindow = new CustomShortcutSetting(item.Key, item.Value, this); if (shortcutSettingWindow.ShowDialog() == true) { + // Fix un-selectable shortcut item after the first selection // https://stackoverflow.com/questions/16789360/wpf-listbox-items-with-changing-hashcode SelectedCustomShortcut = null; item.Key = shortcutSettingWindow.Key;