Skip to content

1886 feature request mouse selection and dragging of multiple processes#2052

Merged
jcelerier merged 7 commits into
masterfrom
1886-feature-request-mouse-selection-and-dragging-of-multiple-processes
Jul 13, 2026
Merged

1886 feature request mouse selection and dragging of multiple processes#2052
jcelerier merged 7 commits into
masterfrom
1886-feature-request-mouse-selection-and-dragging-of-multiple-processes

Conversation

@edumeneses

Copy link
Copy Markdown
Contributor

Done with Claude

Closes #1886

@edumeneses edumeneses self-assigned this May 21, 2026
@edumeneses edumeneses linked an issue May 21, 2026 that may be closed by this pull request
@edumeneses edumeneses requested a review from jcelerier May 21, 2026 19:59
@edumeneses edumeneses marked this pull request as draft May 24, 2026 20:06
@edumeneses edumeneses marked this pull request as ready for review May 25, 2026 13:44
@jcelerier jcelerier force-pushed the 1886-feature-request-mouse-selection-and-dragging-of-multiple-processes branch from ab5ede4 to f77ca84 Compare June 5, 2026 19:05
edumeneses and others added 5 commits June 25, 2026 16:19
NodeItem: respect Ctrl modifier on click — adds/removes from the
current selection instead of always replacing it. Uses filterSelections
to follow the standard GUI cumulation pattern.

NodalIntervalView: replace left-drag-to-pan with rubber-band selection.
Left button drag on empty space draws a dashed XOR selection rectangle
and selects all node items whose scene bounding rect intersects it on
release. With Ctrl held the new selection is merged into the existing
one rather than replacing it. Clicking empty space without dragging
deselects everything. Middle-button drag now pans the container,
preserving the previous pan behaviour under that button.

Nodal::View / Nodal::Presenter: same rubber-band logic for the
Nodal-process layer view. The View emits areaSelectRequested(rect,
cumulation) on mouse release; the Presenter collects every NodeItem
whose scene rect intersects the view-local rubber-band rect and pushes
the resulting Selection to the SelectionStack.

After a box or Ctrl+click multi-selection, the existing
copySelectedProcesses / pasteInCurrentInterval paths already serialise
the selected Process::ProcessModel objects as {Processes, Cables} JSON,
so Ctrl+C / Ctrl+V work without further changes.

Fixes #1886

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…lection

Use a QGraphicsRectItem overlay (Z=1000) instead of painting in the item's
own paint() — which was either skipped due to ItemHasNoContents or rendered
beneath child nodes. Box selection now requires Ctrl+drag; plain left-drag
restores pan behaviour in NodalIntervalView.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…2.darker)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Using SCORE_PLUGIN_DEVICEEXPLORER_EXPORT on a symbol defined in
score_plugin_nodal caused an undefined symbol linker error on platforms
that build with dynamic plugins (macOS, Flatpak).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s into a scenario

When pasting processes copied from a nodal view into a clean scenario,
the old code called loadProcessInSlot() (which assigns new IDs via
getStrongId) but then fed cable paths that still referenced the original
process IDs — causing an assertion crash in restoreCables().

Fix: track the old→new process ID mapping built during loadProcessInSlot
calls, then remap cable endpoint paths before passing them to loadCables().
This keeps loadProcessInSlot (so processes appear as visible timeline slots)
while fixing the ID mismatch that caused the crash.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jcelerier jcelerier force-pushed the 1886-feature-request-mouse-selection-and-dragging-of-multiple-processes branch from f77ca84 to 038ecfb Compare June 25, 2026 20:19
edumeneses and others added 2 commits June 25, 2026 17:06
…be dragged

Pressing on an already-selected node previously ran filterSelections
immediately on press: with Ctrl held (required for box selection) this
toggled the clicked node off, so dragging moved every selected node except
the clicked one; without a modifier it collapsed the selection to the single
clicked node, making it impossible to drag a multi-selection at all.

Defer the selection change to the release event when the pressed node is
already selected. A drag then moves the whole selection untouched, while a
click without drag still applies the standard GUI behaviour (collapse to the
clicked node, or toggle it off when Ctrl is held).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ScenarioEditor::remove only handled the single-element case for processes,
so deleting a nodal box-selection of several processes did nothing (or only
removed one). Add a branch that, when the whole selection is made of
processes living in intervals, removes each of them in a single macro via the
new RemoveMultipleProcessesFromInterval aggregate command.

Also drop the explanatory comments added with the deferred-selection fix.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@edumeneses

Copy link
Copy Markdown
Contributor Author

@jcelerier thanks for the rebase — I pushed two more commits on top of it (branch stays rebased on current master, fast-forward):

  • 4cc6b3502 nodal: defer node selection change to release — pressing an already-selected node ran filterSelections immediately on press. With Ctrl held (required for box-select) it toggled the clicked node off, so dragging moved every selected node except the clicked one; without a modifier it collapsed the selection to the single clicked node, making multi-drag impossible. Now the selection change is deferred to release: a drag moves the whole selection untouched, while a click without drag keeps the standard behaviour (collapse to clicked, or toggle off with Ctrl).

  • a0683cb2e scenario: support deleting a multi-selection of processesScenarioEditor::remove only handled the single-element case for processes, so Delete on a nodal box-selection removed nothing/just one. Added a branch that removes each selected process from its interval in a single macro, via a new RemoveMultipleProcessesFromInterval aggregate command.

Both build cleanly here and the box-select → drag and multi-delete flows now work. Let me know if you'd prefer the multi-delete handled elsewhere than ScenarioEditor::remove.

@jcelerier jcelerier merged commit 195327a into master Jul 13, 2026
54 of 56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: mouse selection and dragging of multiple processes

2 participants