Skip to content

Gtfrans2re/426 drag multi select - #455

Open
gtfrans2re wants to merge 3 commits into
open-rmf:mainfrom
gtfrans2re:gtfrans2re/426-drag-multi-select
Open

gtfrans2re wants to merge 3 commits into
open-rmf:mainfrom
gtfrans2re:gtfrans2re/426-drag-multi-select

Conversation

@gtfrans2re

Copy link
Copy Markdown

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.
  • Gizmo drag (rmf_site_editor, interaction/gizmo.rs): when a drag starts, the initial global transforms of the other selected entities are captured into a new GroupDrag resource. update_drag_motions then 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 a MoveTo per 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

  • I used a GenAI tool in this PR.
  • I did not use GenAI

Assisted-by: Claude Opus 4.8

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>
@mxgrey mxgrey added this to PMC Board Oct 13, 2026
@github-project-automation github-project-automation Bot moved this to Inbox in PMC Board Oct 13, 2026
@mxgrey mxgrey moved this from Inbox to In Review in PMC Board Oct 20, 2026
@mxgrey
mxgrey requested a review from arjo129 October 20, 2026 01:27

This branch has not been deployed

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

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

Drag+Drop during multi-select mode

2 participants