Skip to content
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

Editor viewport hotkeys don't work when property inspector has focus #95607

Closed
wagnerfs opened this issue Aug 16, 2024 · 8 comments · Fixed by #96786
Closed

Editor viewport hotkeys don't work when property inspector has focus #95607

wagnerfs opened this issue Aug 16, 2024 · 8 comments · Fixed by #96786

Comments

@wagnerfs
Copy link
Contributor

Tested versions

  • Reproducible in 4.3.stable
  • Not reproducible in 4.2.2.stable

System information

Windows 10 - Godot 4.3.stable - Vulkan (Forward+)

Issue description

None of the viewport hotkeys (like Numpad_1, Numpad_3, F) work when anything on the property inspector has focus.

image

The issue seems to be related viewport not gaining focus once the mouse has left the inspector panel towards the viewport, on 4.2 the view would automatically gain focus as soon as the mouse is over it

Steps to reproduce

  • Click any property on the property inspector (like scale)
  • Press Enter or Escape
  • Move the mouse over the view and try any hotkeys

Minimal reproduction project (MRP)

N/A

@AThousandShips
Copy link
Member

I'd say this is desired, I wouldn't want or expect the viewport to update when focused in the inspector, I'd consider that a bug rather

@wagnerfs
Copy link
Contributor Author

wagnerfs commented Aug 16, 2024

@AThousandShips can't agree, you have to basically click the viewport to be able to change angles for example, that quickly becomes counterproductive when you just want to update inspector values like position using the mouse or a specific typed in value, let's say, to try and center a MeshInstance3D to the origin, then having to click back to the view, most likely deselect the said MeshInstace3D and lose the entire inspector you were fiddling with just a second ago.

On top of that, since the auto focus isn't working on 4.3, clicking on the MeshIsntance3D on the scene tree view won't focus the view either, which means you'd STILL need to click on the view to be able to change angles or doing any hotkeys, and again, unless you had to precisely click on said MeshInstance3D within the view (that surely won't scale well on large scenes), you'd most likely deselect the node again.

Not only that has been a thing through all past Godot releases, but I can also take Blender as example here, the hotkeys available are the ones available for the panel your mouse is over

@AThousandShips
Copy link
Member

Since it changed between 4.2 and 4.3 it'd be important to identify when it was changed, will try identify it, and from there there would be two paths:

  • If it was accidental this should be discussed, but I don't think that change would obviously be a bug
  • If it was intentional then a proposal for controlling this with a setting should be opened here instead

Will respond when I've found when this was changed

@Calinou
Copy link
Member

Calinou commented Aug 16, 2024

@wagnerfs Can you try following the same steps on 4.3 dev/beta/RCs to determine when the regression started? You can download them here.

@wagnerfs
Copy link
Contributor Author

@Calinou just tested, RC1 was the one that broke it, Dev6 was working fine.

@akien-mga akien-mga added the bug label Aug 17, 2024
@akien-mga akien-mga added this to the 4.4 milestone Aug 17, 2024
@matheusmdx
Copy link
Contributor

matheusmdx commented Aug 21, 2024

Bisecting points to #93165 as the culprit:

image


IMO this is not a big problem because you just need to do a left mouse click on the view area to make works again (u already had to move the mouse to the view area anyways)

@wagnerfs
Copy link
Contributor Author

@matheusmdx if you talk only about the focus then absolutely, only a click away, productivity wise it's a mess, I've explained it here though: #95607 (comment)

@wagnerfs
Copy link
Contributor Author

wagnerfs commented Sep 5, 2024

I got a bit of time to check that PR and indeed, that was the issue, I managed to get it fixed by instead of having EditorSpinSlider::is_text_field always returning true, change the return to value_input_popup && value_input_popup->is_visible(); since it's when and only when the spin field has "become" a text field, so it doesn't rollback that PR at all.

godot.windows.editor.x86_64_2024-09-05_05-16-01.mp4

I'll probably get a PR with the fix ready when I get some free time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment