Skip to content

Commit c428df0

Browse files
authored
Merge pull request #1684 from VictoriousRaptor/Fix1682
Fix item can't be unselected after editing shortcut
2 parents 35fb999 + f20026a commit c428df0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Flow.Launcher/ViewModel/SettingWindowViewModel.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,8 +775,12 @@ public bool EditSelectedCustomShortcut()
775775
var shortcutSettingWindow = new CustomShortcutSetting(item.Key, item.Value, this);
776776
if (shortcutSettingWindow.ShowDialog() == true)
777777
{
778+
// Fix un-selectable shortcut item after the first selection
779+
// https://stackoverflow.com/questions/16789360/wpf-listbox-items-with-changing-hashcode
780+
SelectedCustomShortcut = null;
778781
item.Key = shortcutSettingWindow.Key;
779782
item.Value = shortcutSettingWindow.Value;
783+
SelectedCustomShortcut = item;
780784
return true;
781785
}
782786
return false;

0 commit comments

Comments
 (0)