-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Close context menus when deselecting items in editor #29279
Merged
bdach
merged 26 commits into
ppy:master
from
normalid-awa:bugfix/editor/delete-operation-wont-close-the-menu
Aug 7, 2024
Merged
Changes from 19 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
de6d8e7
Add the custom context menu to handle the key event
normalid-awa 83aeb27
Replace original menu container to the custom one
normalid-awa 1ff0c7c
Replace original menu container with custom one
normalid-awa 5c5fcd7
Allow key event pass through selection handler
normalid-awa 27d6c4c
Implement on beatmap editor
normalid-awa 3cc5466
Refactor the code to follow IoC principle and more flexible
normalid-awa 5d31171
Fix code quality
normalid-awa 7c83d6a
Cleanup code
normalid-awa 2145368
Merge `EditorContextMenuContainer` into `OsuContextMenuContainer`
normalid-awa 38dacfe
Fix unit test
normalid-awa 7cebf4c
Fix code quality
normalid-awa b32d97b
Remove decreapted property
normalid-awa 2720bcf
Fix ruleset unit test
normalid-awa 1b25633
Fix headless test
normalid-awa 2098fb8
Fix code quality
normalid-awa 6d385c6
Remove the meaningless `OpenMenu` method
normalid-awa 75c0c6a
Make the `OsuContextMenu` nullable in `SelectionHandler`
normalid-awa 3c8d0ce
Revert the unit test changes
normalid-awa 59ff549
Remove unused using
normalid-awa 22ab6f5
Add back the sample into `OsuContextMenu`
normalid-awa cb877b7
Close the menu when selecting other object
normalid-awa b91461e
Refactor + CI fixes
smoogipoo c574551
Simplify caching
smoogipoo c26a664
Use InternalChild directly
smoogipoo 41d84ea
Revert all SkinEditor changes (none required)
smoogipoo aae49d3
Fix unit test code quality
normalid-awa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One situation I'm not sure about is that pasting doesn't close the menu even though it selects the newly-pasted hitobjects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
close the menu whatever the selected object changed
internal virtual void HandleSelected(SelectionBlueprint<T> blueprint) { // there are potentially multiple SelectionHandlers active, but we only want to add items to the selected list once. if (!SelectedItems.Contains(blueprint.Item)) SelectedItems.Add(blueprint.Item); selectedBlueprints.Add(blueprint); + ContextMenuContainer?.CloseMenu(); }