Repository navigation
Gtfrans2re/426 drag multi select - #455
Open
gtfrans2re wants to merge 3 commits into
Open
gtfrans2re wants to merge 3 commits into
gtfrans2re wants to merge 3 commits into
Conversation
Ctrl + left click on a wall, lane, door, measurement or floor inserts an anchor that splits it: an edge A->B becomes A->C and C->B (the new segment keeps the original edge's properties), and a floor path gets the anchor inserted into its nearest segment. Closes open-rmf#62. Signed-off-by: gtfrans2re <francoisgonothitoure@gmail.com>
Dragging a multi-selected group previously moved only the grabbed entity and reset the rest of the selection. Now a plain click on an already-selected entity preserves the selection, and the drag captures the other selected entities' initial transforms and translates them all by the same delta. Closes open-rmf#426. Signed-off-by: gtfrans2re <francoisgonothitoure@gmail.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dragging a multi-selected group of anchors or models now moves the whole selection together, instead of moving only the grabbed item and dropping the rest of the selection.
Closes #426.
New feature implementation
Implemented feature
When several entities are selected with Shift-click, grabbing and dragging any one of them now translates the entire selection by the same amount. Before, the drag moved only the clicked entity and reset the multi-selection down to that single item.
Implementation description
Two changes:
selection_update(rmf_site_picking): a plain (non-multi) click on an entity that is already part of a multi-selection now preserves the whole selection, so the group is still selected when the drag begins. Narrowing back to a single entity still works by clicking an entity that is not in the selection.rmf_site_editor,interaction/gizmo.rs): when a drag starts, the initial global transforms of the other selected entities are captured into a newGroupDragresource.update_drag_motionsthen applies the drag's world-space delta to each of them, using each entity's own parent-inverse transform so selections that span different parents or levels stay correct, and emits aMoveToper member. The resource is cleared when the drag ends.Tested on
office.building.yaml: Shift-selecting several anchors (and separately several models), then dragging one, moves them all together while keeping their relative positions. Single-selection drag and plain-click selection behave as before.One behavioural note: a plain click on a member of a multi-selection now keeps the group so it can be dragged, rather than narrowing to that one item. Clicking an entity outside the selection narrows as before. A "narrow on release if no drag happened" variant is possible if you'd prefer it.
GenAI Use
We follow OSRA's policy on GenAI tools
Assisted-by: Claude Opus 4.8