Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyCommandBinds maintenance and defaults correction #2885

Merged
merged 1 commit into from
May 30, 2021

Conversation

SJuliez
Copy link
Member

@SJuliez SJuliez commented May 27, 2021

I think that keycommands using modifiers all stopped working with the recent replacement of deprecated modifier constants as the new modifier constants use different values. These were not updated in the defaultkeybinds.xml. Correcting this.
Also some code maintenance on the KeyCommandBinds and MegaMekController.

for (KeyCommandBind kcb : kcbs) {
// Do we have a binding for this key?
if (!keyCmdSet.contains(kcb)) {
for (var kcb : KeyCommandBind.getBindByKey(keyCode, modifiers)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't affect functionality, but, in general, I prefer to leave this sort of thing as it was previously (declare and assign variable then use it in a loop), the reason being that I can more easily, while debugging, examine the value that the function call produces.

@NickAragua NickAragua merged commit 2c0ad11 into MegaMek:master May 30, 2021
@SJuliez SJuliez deleted the KCB_update branch June 26, 2021 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants