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

Fix context menu not closing when placing freehand slider #31058

Closed

Conversation

kongehund
Copy link
Contributor

@kongehund kongehund commented Dec 10, 2024

Fixes #31053 by overriding SliderPlacementBlueprint's DragBlocksClick to always return false.

The issue arose because osu.Framework.Input.MouseButtonEventManager did not trigger a change focus event, because the HandleButtonUp method requires that DraggedDrawable does not block clicks (due to 9482125)

@bdach
Copy link
Collaborator

bdach commented Dec 11, 2024

I think this is approaching the problem from a completely wrong angle because it's not fixing what I perceive to be the actual problem.

I perceive the actual problem here to be that when you have a context menu open for a selected object, and then you deselect it via tool switching, the context menu remains open. If it were to automatically close on deselection as I perceive it should, that would prevent this slider drag scenario from ever arising in the first place.

To put it in other words: I would accept a diff that ensures context menus close on selection loss. I would not accept this diff.

@peppy would you tend to agree with that assessment?

@peppy
Copy link
Member

peppy commented Dec 11, 2024

Yeah, changing tools should dismiss any context menu.

@bdach
Copy link
Collaborator

bdach commented Dec 11, 2024

In that case, closing and renaming issue to reflect the actual desired behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tool changes and other means of selection loss should close object context menu
4 participants