Merge pull request #1684 from VictoriousRaptor/Fix1682

Fix item can't be unselected after editing shortcut
This commit is contained in:
Jeremy Wu 2022-12-20 21:57:13 +11:00 committed by GitHub
commit c428df034d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -775,8 +775,12 @@ namespace Flow.Launcher.ViewModel
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;
item.Value = shortcutSettingWindow.Value;
SelectedCustomShortcut = item;
return true;
}
return false;