Skip to content

Multi-PC: Rulers on screens can measure a remote's selected screen - #838

Merged
mgth merged 1 commit into
v6from
fix/mpc-rulers-remote-selected
Nov 25, 2026
Merged

mgth merged 1 commit into
v6from
fix/mpc-rulers-remote-selected

Conversation

@mgth

@mgth mgth commented Nov 25, 2026

Copy link
Copy Markdown
Owner

"Rulers on screens" was greyed out when the selected screen was a remote's. Yet, turned on from a local screen, the rulers already showed on the remote's screens too (#817).

Cause

screen_overlay_controls enabled the toggle only when self.selected.is_some() && self.selected_remote().is_none(). The comment said the rulers are drawn on the selected screen, "which must be one of this machine's". That rule predates #817 and was never relaxed. A test held it.

Change

  • The toggle needs a selected screen, any machine's. The scene measures the selected panel by its millimetres in the layout (depth_projection), which a remote's panel has like a local one. So nothing else changes: the master's screens (local_view) and each remote's (remote_rulers::wanted) all measure it. On the remote itself the zero falls at its own panel's edge.
  • The test a_remote_monitor_carries_its_machine_and_keeps_local_only_controls_away now checks the toggle is available on a remote's screen.
  • New unit test a_remotes_panel_selected_is_measured_on_every_screen: on the remote, its own length, from zero; on the master's screen, the remote panel's length.

Checks

  • cargo test -p lbm-app: all pass.
  • cargo clippy -p lbm-app --all-targets: clean.

Not tried on real hardware

Not tried with lbm-app on a real master: the window and the scenes are covered by tests only.

docs/multi-pc.md and docs/multi-pc-etat.md are updated (the "greyed" limit removed).

🤖 Generated with Claude Code

The toggle was disabled whenever the selected monitor was a remote's, a rule from
before the rulers reached the remotes (#817). The scene only needs the selected
panel's millimetres, which a remote's panel has in the layout like any other: the
master's screens and the remotes' all measure it. The rule goes, the test that held
it now checks the toggle is available, and a unit test checks both scenes measure a
remote's panel (zero at the panel's own edge on the remote).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@mgth mgth left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

J’ai vérifié la sélection d’un écran distant en mode Placement. Les six tests de remote_rulers et le test des contrôles du panneau distant passent. Ils couvrent l’activation de la commande, les dimensions du panneau sélectionné sur les deux machines et le zéro de la règle sur l’écran distant. Aucun point à corriger relevé. L’affichage sur deux écrans physiques n’a pas été rejoué.

@mgth
mgth merged commit e8e04eb into v6 Nov 25, 2026
3 checks passed
@mgth
mgth deleted the fix/mpc-rulers-remote-selected branch November 25, 2026 08:49
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.

1 participant