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

Don't show submenu shortcuts for command options #7517

Merged
merged 1 commit into from Mar 29, 2023
Merged

Conversation

vlaaad
Copy link
Contributor

@vlaaad vlaaad commented Mar 29, 2023

User-facing changes:
Previously, sub-menus like File -> New and Game Object -> Add Component showed the same shortcut on every option item. This changeset turns this behavior off.

Technical notes:
I implemented the fix by only showing the key combo if the menu item does not define custom user data since this is what differentiates the options from each other. It was wrong to show the key combinations on such options because invoking a command using a key combination does not supply this user data anyway.

Fixes #7442

@vlaaad vlaaad requested a review from matgis March 29, 2023 12:45
User-facing changes:
Previously, sub-menus like `File -> New` and `Game Object -> Add Component` showed the same shortcut on every option item. This changeset turns this behavior off.

Technical notes:
I implemented the fix by only showing the key combo if the menu item does not define custom user data since this is what differentiates the options from each other. It was wrong to show the key combinations on such options because invoking a command using a key combination does not supply this user data anyway.

Fixes #7442
Copy link
Contributor

@matgis matgis left a comment

Choose a reason for hiding this comment

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

Ship it!

@vlaaad vlaaad merged commit 8ca9218 into editor-dev Mar 29, 2023
4 checks passed
@vlaaad vlaaad deleted the DEFEDIT-7442 branch March 29, 2023 13:18
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.

None yet

2 participants