godotengine / godotengine/godot
SpinBox not setting the visibility layer of its inner line edit
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
- Reproducible in v4.2.1.stable.mono.official [b09f793f5]
### System information
Windows 10 - Godot v4.2.1.stable.mono.official [b09f793f5]
### Issue description
A SpinBox's `visibility_layer` does not get copied to the inner LineEdit, so changing the viewport's canvas cull mask to not have the default layer bit set hides the line edit.
I found a workaround where I attach a script to the node with the following code:
```gdscript
extends SpinBox
func _ready():
get_line_edit().visibillity_layer = visibility_layer
```
### Steps to reproduce
- Create a new SpinBox scene
- Edit the SpinBox's visibility layer to have bits 1 and 2 set
- Change the root viewport's canvas cull mask to have only bit 2 set
### Minimal reproduction project (MRP)
[spinbox-visibility-layer-bug.zip](https://github.com/user-attachments/files/16569104/spinbox-visibility-layer-bug.zip)
Starting the project and pressing the enter key toggles the root viewport's canvas cull mask between having only layer 1 and having only layer 2 visible.
Contributor guide
Assessment
This issue has not been assessed yet.