-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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 permanently selected audio bus effects #85879
Conversation
editor/editor_audio_buses.cpp
Outdated
@@ -500,6 +500,10 @@ void EditorAudioBus::_effect_selected() { | |||
updating_bus = false; | |||
} | |||
|
|||
void EditorAudioBus::_effects_deselected() { | |||
effects->deselect_all(); |
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.
This works for some cases when focus is lost, but it's kind of annoying when your mouse is just hovering over another node like the scene editor. Is there a way to check "is left mouse button down" at this part? That way, it's clear that the user is intentionally clicking away.
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.
No. Other docks don't deselect on focus lost (e.g. file dock), rather they do it when you click away. Though then there is inspector, which doesn't allow deselecting properties 🤷♂️
You could use "empty_clicked" signal for deselecting. This means you'd need to click the empty space under effects, but they'd be deselectable in a predictable way at least. The empty space in bus layout (between buses) could be used too.
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.
Oh okay, the empty click event makes more sense. I'll try that, thanks! I couldn't find a generic one for "clicked somewhere else /outside/ of the current panel," so I guess that doesn't exist?
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.
Yep, clicking another control at most can steal focus.
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.
The solution could use some tweaks, as discussed in the comments, but it's already acceptable I think.
Is this equivalent to #42035? |
Yes, although the solution here is better. |
I was planning to use And ah, yes it looks like someone else already made this change 3 years ago haha. I suppose y'all can decide which PR to merge! EDIT: I did a force push to clean the commit log, hopefully that's okay |
e53a383
to
cf39cc9
Compare
For stuff like generic containers you could use |
Thanks, and congrats on your first merged Godot contribution! |
Cherry-picked for 4.2.2. |
This allows the audio bus effects to be deselected if the focus changes to fix this bug. Here is a recording of the new behavior:
Screen.Recording.2023-12-06.at.11.28.41.PM.mov
This is my first PR, and I wasn't sure if this was the best way to do it. I'm open to any feedback. Thanks for taking a look!
Bugsquad edit: