feat(snap): Shift+RMB one-shot snap override menu (#337)

Shift+right-click in the viewport opens a cursor-anchored grid of snap
icons (names as hover tooltips). Picking one engages a one-shot
override: only that snap applies — even with running osnap off — until
the next point pick commits, which restores the saved configuration.
Esc drops an unconsumed override; an outside click closes the menu.
The status-bar snap toggles are untouched — this is a separate,
temporary mechanism.

Covers items 1 and 2 of #337 (mid-between-two-points still pending).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Fable 5 committed 2026-07-22 12:27:27 +03:00
1 parent d2be0c9bea
commit dd40e1f632
7 files changed
+166

No files matched your search

+8
View File
@@ -1511,6 +1511,13 @@ impl OpenCADStudio {
iced::widget::Space::new().width(0).height(0).into()
};
let snap_override_layer: Element<'_, Message> =
if let Some(pos) = self.snap_override_popup {
overlay::snap_override_overlay(pos)
} else {
iced::widget::Space::new().width(0).height(0).into()
};
let qselect_layer: Element<'_, Message> = if let Some(state) = &self.qselect {
let types = tab.scene.entity_type_names_in_layout();
let properties = tab.scene.qselect_properties(state.type_filter.as_deref());
@@ -1538,6 +1545,7 @@ impl OpenCADStudio {
dropdown_layer,
layout_ctx_layer,
qselect_layer,
snap_override_layer,
open_progress_layer,
];