Merge pull request #5087 from Jaex/master

fixed #5068: Automatically register failed hotkeys
This commit is contained in:
Jaex 2020-10-01 01:27:38 +03:00 committed by GitHub
commit c5ecb6af06
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -111,10 +111,21 @@ private void UpdateHotkeyStatus()
}
}
private void RegisterFailedHotkeys()
{
foreach (HotkeySettings hotkeySettings in manager.Hotkeys.Where(x => x.HotkeyInfo.Status == HotkeyStatus.Failed))
{
manager.RegisterHotkey(hotkeySettings);
}
UpdateHotkeyStatus();
}
private void control_HotkeyChanged(object sender, EventArgs e)
{
HotkeySelectionControl control = (HotkeySelectionControl)sender;
manager.RegisterHotkey(control.Setting);
RegisterFailedHotkeys();
}
private HotkeySelectionControl AddHotkeySelectionControl(HotkeySettings hotkeySetting)