-
-
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
Changing visibility for a node in an editor dock has no effect #89211
Comments
It doesn't make sense .-. if is_instance_valid(side_panel_instance):
side_panel_instance.visible = visible
print(visible)
prints(side_panel_instance.visible, side_panel_instance.is_visible_in_tree(), side_panel_instance.get_child(0).visible, side_panel_instance.get_child(0).is_visible_in_tree()) This prints:
Which means:
That said, the |
This comment was marked as spam.
This comment was marked as spam.
What should I do instead? Add/remove the side_panel_container? |
Yeah this is a bug from TabContainer changes. It does have logic to handle this case, but something works incorrectly here.
That's not really a suitable issue for newcomers. |
This comment was marked as off-topic.
This comment was marked as off-topic.
It's probably in
Adding and removing it should work. Or if you want the panel to stay open, you could change the visibility of a child of the panel instead. if visible and not side_panel_instance.get_parent():
add_control_to_dock(EditorPlugin.DOCK_SLOT_RIGHT_BL, side_panel_instance)
elif side_panel_instance.get_parent():
remove_control_from_docks(side_panel_instance) Edit: This would probably be a good use case for exposing |
Tested versions
System information
Godot v4.3.dev4 - Windows 10.0.19045 - Vulkan (Mobile)
Issue description
In plugins, if you toggle the visibility of a dock-attached node from false to true, the node stays invisible. Please see the attached project. The label in the dock on the bottom right corner should become visible when the Polygon2D node is selected in the scene tree. This works in 4.2, but not in the latest preview build.
Steps to reproduce
From an editor plugin, add a node in one of the editor dock slots. Toggle visibility to false and back to true. The node will not be visible, even if the "visible" is set to true.
Minimal reproduction project (MRP)
VisibilityBug.zip
The text was updated successfully, but these errors were encountered: