enh(viz): improve how distances are removed
Description
SRemoveDistance
is a service from sight::module::ui::base::metrics
. It opens a widget with a list of existing distances in the image and allows the selection of them in order to delete them.
The described service is not very convenient, we would like to enhance it by allowing selecting directly the distance on the image and deleting it with a keyboard shortcut ui button.
Proposal
Get rid of the little widget and allow clicking on the distance we want to delete and press a keyboard shortcut button to delete it.
Functional specifications
In the UI, we should be able to:
- click/touch a distance
- This highlights the distance (change of color or scale)
- This enables the "Remove" button (which could be later generic for other elements such as landmarks)
- click the remove button
- distance removed
Technical specifications
- Remove
SRemoveDistance
and its unit test - Create a new adaptor service in scene3D.
The service should:
- check if the clicked object is of type
ManualObject
and if it exists as a distance in the image (by comparing the IDs) - highlight the object by either scaling it up or changing its color
- create a signal to inform that a distance has been selected. This will be used to, later on, activate a UI button
- create a slot to delete the selected object. this slot should take an ID as a parameter.
Test plan
GUI test