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

Allow deselecting entities in entity tree with CTRL left click #367

Open
sloretz opened this issue Sep 23, 2020 · 9 comments
Open

Allow deselecting entities in entity tree with CTRL left click #367

sloretz opened this issue Sep 23, 2020 · 9 comments
Labels
enhancement New feature or request GUI Gazebo's graphical interface (not pure Ignition GUI) help wanted We accept pull requests!

Comments

@sloretz
Copy link

sloretz commented Sep 23, 2020

(Ignition Citadel 3.3.0) CTRL clicking can be used to select entities, but not deselect them. Other programs do allow deselecting by CTRL left clicking again (example Microsoft Excel)

deselect_ctrl_entity_tree

@sloretz sloretz changed the title Allow deselecting entities in entity tree with CTRL Allow deselecting entities in entity tree with CTRL left click Sep 23, 2020
@chapulina chapulina added enhancement New feature or request GUI Gazebo's graphical interface (not pure Ignition GUI) good first issue Good for newcomers labels Sep 23, 2020
@herobank110
Copy link
Contributor

Hello, could I take a look at this issue?

@chapulina
Copy link
Contributor

@herobank110 , feel free to pick it up, I don't think anyone is working on this. Thanks!

@WagnerMarcos
Copy link
Contributor

Hi! I am working on this Issue to implement the deselection.

@mjcarroll
Copy link
Contributor

Thanks @WagnerMarcos ! I have assigned to you and moved to "In Progress". Feel free to tag me as a reviewer when your PR is up.

@WagnerMarcos
Copy link
Contributor

In this Issue the idea is that when holding ctrl and using left click on a selected entity from the entity tree, it gets deselected. In EntityTree.qml this click gets detected and then calls EntityTree.cc to send a selection event. The visual part in qml is simple and straightforward, but the C++ is taking more time than expected.

I'm trying to get right the extent of the Issue, as the events gets filtered in Scene3D, Component Inspector (which could be ignored at the moment), Joint Position Controller (also ignorable) and the AlignTool.

For this Issue I'm thinking I have some alternatives I could follow. The first one would be to define a new event and make parallelism between the selection/deselection. A similar one to this would be to have some boolean to tell if the clicking interaction with the entity was for selecting or deselecting.

Another alternative would be to ask in the plugin that filter this event when a selection was made, if that item was already selected, and if so, to deselect it. But for this there could be it should be checked if the selection was made with the ctrl key pressed, and that might be messy.

Things to consider would be how to do the same when an entity gets click on the gazebo scene, to also update the model correctly.

For the Component Inspector, would it be ok to set it kNullEntity when deselecting? (This way, it would show the world properties)
And for the AlignTool it only updates if the process is not user created, so no changes might be needed there.

@francocipollone
Copy link
Contributor

I assume that the behavior of this feature, which was requested for the entity tree, should be paired with Scene3D plugin of course. So as there is a consistency between which entity is selected in the entity tree and the highlighted entities in the scene.

From here, some expected behaviors are detached.

    1. First of all, we have the visual upgrade and the actual request of the ticket: Deselecting entities in the entity tree by ctrl-clicking its entities.
    1. Propagation to Scene3D:
      • When deselecting an entity in the entity tree should also "lowlight" the entity in the Scene that previously was highlighted.
    1. Propagation to EntityTree from other plugins.
      • Scene3D should allow you to deselect the entities in the Scene by ctrl-clicking on them.
      • EntityTree should be reflected with the current changes in the Scene (selection).

I think that focusing on how Scene3D and EntityTree deal with this new feature is the key to this issue.
From what I saw in ComponentInspector, JointPositionController and AlignTool I don't think that this new deselection feature in the EntitiyTree should necessary enforce to change something in the behavior of those plugins, at least for the moment.

@scpeters
Copy link
Member

scpeters commented Jun 3, 2021

yes, it turns out this is a bit more complicated than I had anticipated; I'm going to remove the "good first issue" label

@scpeters scpeters removed the good first issue Good for newcomers label Jun 3, 2021
@scpeters
Copy link
Member

scpeters commented Jun 3, 2021

  1. First of all, we have the visual upgrade and the actual request of the ticket: Deselecting entities in the entity tree by ctrl-clicking its entities.
    1. Propagation to Scene3D:

      • When deselecting an entity in the entity tree should also "lowlight" the entity in the Scene that previously was highlighted.
    1. Propagation to EntityTree from other plugins.

      • Scene3D should allow you to deselect the entities in the Scene by ctrl-clicking on them.
      • EntityTree should be reflected with the current changes in the Scene (selection).

I think this proposal makes sense, but there is currently a large effort to move much of the functionality from these plugins to ign-gui (gazebosim/gz-gui#137), so I think it may be best to hold off on this work for now. It can be revisited after the larger migration is done

@WagnerMarcos
Copy link
Contributor

I'll put it on hold then and work on another issue then. I'll try to keep up with that migration so I know how it affects the issue for when I come back to it.

@chapulina chapulina added the help wanted We accept pull requests! label Nov 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request GUI Gazebo's graphical interface (not pure Ignition GUI) help wanted We accept pull requests!
Projects
None yet
Development

No branches or pull requests

7 participants