feat(viewport): RMB 1st=Enter, 2nd=menu (no setting)

Replaces the opt-in `rmb_enter` setting (and `RMBENTER` command) with
always-on behavior. While a command is active, the first viewport
right-click acts as Enter (commit / close) and a second consecutive
right-click opens the context menu instead. Idle right-click still opens
the menu; right-drag still orbits.

The cycle is tracked per tab (`right_click_entered`) and restarts on any
other interaction — a left-click pick, a new command, an orbit, or
leaving the viewport — so the next right-click is Enter again.

Refines #185.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hakan Seven 2026-06-27 16:32:40 +03:00
commit b691854e7a
8 changed files with 26 additions and 41 deletions

View file

@ -247,9 +247,6 @@ pub(super) struct OpenCADStudio {
dyn_input: bool,
/// Controls whether the TEXTEDIT command repeats automatically (0 = Multiple, 1 = Single).
pub texteditmode: bool,
/// When true, a viewport right-click acts as Enter while a command is active
/// (idle right-click still opens the context menu). Toggled by `RMBENTER`.
pub rmb_enter: bool,
/// Persisted default viewport background, restored from settings and applied
/// to every drawing tab (new and opened) so a chosen background survives
/// restarts (#188). `None` = the built-in dark-grey / off-white defaults.
@ -1826,7 +1823,6 @@ impl OpenCADStudio {
show_grid: false,
dyn_input: true,
texteditmode: false,
rmb_enter: false,
default_bg_color: None,
default_paper_bg_color: None,
awaiting_vports: false,