godotengine / godot

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

AnimatedSprite | Select Frames dialog, auto-select field contents #64123

Open jgodfrey opened 2 years ago

jgodfrey commented 2 years ago

Godot version

3.5.stable.official

System information

Windows 10

Issue description

When using the AnimatedSprite | Select Frames dialog, the current field (Horizontal, Vertical, Size, Separation, Offset) contents are not "auto-selected" when the field receives focus (either by pressing Tab or mouse-click into the field).

So, if you tab across the fields (for example) and enter values the typed information is concatenated to each field's current content rather than replacing it. So, to effectively change a value, you must either Ctrl-A to select everything in the field prior to typing or manually delete the current contents. This makes changing all of the fields much harder than necessary.

image

Steps to reproduce

Minimal reproduction project

Unnecessary here I think, but happy to provide something if needed.

Calinou commented 2 years ago

I think this behavior should be implemented in base SpinBox directly, instead of being done in editor code.

jgodfrey commented 2 years ago

@Calinou - agreed, that makes sense. I assumed the issue was being handled more locally since there are other examples of spinbox usage where auto-selection works as expected. Though, I can't think of a case where the auto-select behavior would be undesirable, so implementing it at the level of the control seems reasonable.