-
-
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 ColorPickerButton
close popup on mouse click
#98428
base: master
Are you sure you want to change the base?
Fix ColorPickerButton
close popup on mouse click
#98428
Conversation
589b679
to
6290f1b
Compare
Can I get a review? |
} | ||
|
||
BaseButton::gui_input(p_event); | ||
} |
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.
Why this code isn't in pressed()
method?
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.
I tried that at the beginning, but I noticed that when pressed()
is being executed, the popup is not visible anymore because you click outside of it (which hides the popup). If this code is implemented into pressed()
, popup->is_visible()
will always return false and that will lead to assume that the popup should be open.
To overcome that, I implemented this code into gui_input
which gets executed before the popup is hidden due to a click was made outside of it.
There is another fix for that issue (#93775), but this one is simpler, so it's more preferable. |
6290f1b
to
b24d56f
Compare
(updating to the latest changes on master just because I was here 😉 ) |
b24d56f
to
32caf48
Compare
Fixes #91813
There is a proposal to fix this properly, because it is out of my league and it seems that nobody started to work on it, I decided to propose this fix as a temporary measure until that proposal is implemented.