-
-
Notifications
You must be signed in to change notification settings - Fork 21.8k
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
NOTIFICATION_VISIBILITY_CHANGED is called twice when a WindowDialog is opened #18160
Comments
@akien-mga I really sorry |
No worry :) CanvasItem is such a core component that any change to hit can mess things up in unpredictable way, as happened here. We'll have to do some more research to figure out how to fix this issue without having regressions. |
Any hint on this? |
ran into this problem too. hoping for a fix |
"NOTIFICATION_VISIBILITY_CHANGED is called twice" make http send twice when I open "Templates" tab in project manager dialog. #14653 hoping for a fix. |
It seems this not only affects WindowDialogs but CanvasItems in general. In the attached sample vis_signal_test.zip the first time the node becomes visible, visibility_changed() is called twice. Further, in visibility_changed() the .visible value is always true so there is no way to check the current state, is that expected behavior? |
I found there are two entrances in CanvasItem class that notification(NOTIFICATION_VISIBILITY_CHANGED); First is _propagate_visibility_changed, which used by show() and hide() function.
And second is used by CanvasItem::update()
So there should be a mechanism to control notification(NOTIFICATION_VISIBILITY_CHANGED); when first become visible. |
Godot 3.0.2
Windows 10 64 bits
When I call
popup_centered_minsize()
, my dialog is receiving twice the same notification when made visible.Repro:
_notification
and checks for NOTIFICATION_VISIBILITY_CHANGEDFurther open/close only trigger the notification once, as expected.
Project:
VisibilityChangedCalledTwice.zip
The text was updated successfully, but these errors were encountered: