godot icon indicating copy to clipboard operation
godot copied to clipboard

Sprite Frames Select Frames editor window: cannot drag-select numeric field without focusing on field first

Open hsandt opened this issue 2 years ago • 2 comments

Godot version

v4.0.beta.custom_build [767f8fb48]

System information

Linux Ubuntu 20.04 with Unity desktop

Issue description

In the SpriteFrames > Select Frames popup, if you press and hold the mouse primary button in order to drag-select any numeric field, the field doesn't react to the selection: it will only focus on the field.

You must drag-select the number once more after focus to actually select the number.

This is a very important move to quickly select the numbers and change them, esp. as the Select Frames window sometimes forget the previous settings.

Workaround: double-click on the numeric field to select the whole number

Steps to reproduce

  1. Create a Resource > SpriteFrames
  2. In the SpriteFrames window, Add frames from sprite (Ctrl+Shift+O) and select any texture to open the Select Frames popup
  3. Move the cursor over a numerical field, e.g. Horizontal, on the left or right of the number.
  4. Press and hold the primary click button, then move the cursor to the opposite side of the number ("drag-select"). Expected: the number is selected and highlighted Actual: the field is simply focused

Minimal reproduction project

It's probably faster to just follow the steps on any project.

hsandt avatar Nov 13 '22 17:11 hsandt

Does this work with other numeric fields in the editor, or a SpinBox node in a project?

Also, does the same operation work in the SpriteFrames editor in 3.x?

Calinou avatar Nov 21 '22 23:11 Calinou

  • Other text fields outside this popup highlight fine. I couldn't find an example with a numeric field, because dragging a numeric field in general will scroll the value instead (they seem to use a different type of numeric field widget).
  • Wow, good catch, the SpinBox node at runtime has the same issue in Godot 4!
  • In Godot 3.4, both the SpriteFrames numerical field and runtime SpinBox highlight fine! So this is a regression, and both seem to share the same code.

hsandt avatar Nov 27 '22 15:11 hsandt