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

Hitting Esc does not return to Selection mode #369

Closed
sloretz opened this issue Sep 23, 2020 · 4 comments · Fixed by #466
Closed

Hitting Esc does not return to Selection mode #369

sloretz opened this issue Sep 23, 2020 · 4 comments · Fixed by #466
Assignees
Labels
bug Something isn't working good first issue Good for newcomers GUI Gazebo's graphical interface (not pure Ignition GUI)

Comments

@sloretz
Copy link

sloretz commented Sep 23, 2020

(Ignition Citadel 3.3.0) The Manipulating Models tutorial says Esc returns to select mode from any other mode, but this does not appear to be the case.

You can always return to selection mode from any other mode by pressing Esc.

https://github.com/ignitionrobotics/docs/blame/master/citadel/Manipulating_models.md#L42
https://ignitionrobotics.org/docs/citadel/manipulating_models#select-mode

Hitting Esc in Translate mode or Rotate mode deselects entities that are being acted upon, but it never returns to Select mode. Esc as deselect feels pretty intuitive to me - maybe the line about returning to Select mode should be removed from the tutorial?

esc_deselects

@chapulina
Copy link
Contributor

but it never returns to Select mode

It does for me if the 3D scene has focus, but not if the entity tree has focus. I think we could just make sure that works. And also mention on the documentation that esc also deselects all entities? CC @JShep1

esc

@chapulina chapulina added bug Something isn't working good first issue Good for newcomers GUI Gazebo's graphical interface (not pure Ignition GUI) labels Sep 23, 2020
@sloretz
Copy link
Author

sloretz commented Sep 23, 2020

It does for me if the 3D scene has focus, but not if the entity tree has focus.

Interesting! If I add shapes to empty.sdf then it works for me with the 3D scene in focus, but if I launch shapes.sdf and add the Transform Control plugin then I get the behavior in the issue.

@JShep1
Copy link

JShep1 commented Sep 23, 2020

Interesting! If I add shapes to empty.sdf then it works for me with the 3D scene in focus, but if I launch shapes.sdf and add the Transform Control plugin then I get the behavior in the issue.

Yeah, so just for some background, this issue is likely boiling down to how QML captures input. Whichever section is currently focused will accept the input and the other sections will not observe this input, I suppose this is a QML way of optimizing its front-end, but it has proven to be sort of a nuisance in cases like these. Currently, the method of the focus transitioning to the 3d scene is simply hovering your mouse over that area, so no action will occur on a button press unless the mouse has at least hovered over the 3d scene first (possibly we should add some documentation about this, I tried to fix this awhile ago and honestly couldn't find the best solution which focuses the 3d scene at all times, it may be worth re-visiting).

I see what you mean with the transform control not returning to select mode when the escape button is pressed when you load in the Transform Control via the plugin menu, I'll need to look into this some more.

@JShep1 JShep1 self-assigned this Sep 23, 2020
@JShep1 JShep1 linked a pull request Nov 24, 2020 that will close this issue
@JShep1
Copy link

JShep1 commented Nov 24, 2020

This issue should be solved in #466 . The reason this was occurring is because the TreeView in the Entity Tree is capturing the escape key press under the hood. The transform control plugin was using a qml shortcut for escape which under the hood is waiting for an escape key press. Since the TreeView was capturing the escape key press event, the Transform control wasn't seeing the key event and wasn't transitioning the plugin back to the select state. The reason entities are deselected is because Scene3D is waiting for an escape key release to deselect entities. In the above mentioned PR, I moved transform control away from qml Shortcuts and also set the plugin to transition to the select state if an escape key release event is detected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers GUI Gazebo's graphical interface (not pure Ignition GUI)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants