godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.14k stars 20.2k forks source link

Multiple ScrollContainer nodes under a TabContainer show warning messages #97233

Open Odiobill opened 3 hours ago

Odiobill commented 3 hours ago

Tested versions

System information

CachyOS Linux (Arch based), kernel 6.11.0-2-cachyos (64-bit)

Issue description

Adding multiple ScrollContainer nodes under a TabContainer shows yellow triangles with the warning message:

The warning will appear for every ScrollContainer after the first one.

Screenshot_20240920_121644

Steps to reproduce

Minimal reproduction project (MRP)

N/A

AThousandShips commented 2 hours ago

This sounds like it duplicates it's own scroll bars incorrectly when duplicating, making it fail the check which checks for the scroll bars, will do some digging and test

AThousandShips commented 1 hour ago

This is caused by an oversight in the checks for the scroll container check: https://github.com/godotengine/godot/blob/0a4aedb36065f66fc7e99cb2e6de3e55242f9dfb/scene/gui/scroll_container.cpp#L535-L557

This should probably use: as_sortable_control(get_child(i), SortableVisbilityMode::VISIBLE);

CC @KoBeWi