feat(snap): expose MTP in snap override and context menus

The MTP/M2P midpoint-between-two-points modifier existed as a typed transparent command only. Add it to the Shift+RMB snap override menu as an icon-only cell after Parallel (hover tooltip, no text) with a new osnap/mtp.svg marker, plus a context-menu entry while a point prompt is active.
This commit is contained in:
odofaro committed 2026-09-11 17:57:55 +02:00
1 parent 7d0c059b30
commit 03075612fa
6 files changed
+77 -12

No files matched your search

+6
View File
@@ -1629,6 +1629,11 @@ bg={bg_ms:.1}ms n={view_count}"
};
if let Some(p) = ctx_pos {
let has_cmd = tab.active_cmd.is_some();
// Same guard as typed MTP/M2P and SnapOverrideMtp.
let has_point_step = tab.active_cmd.as_ref().is_some_and(|c| {
(!c.input_kind().wants_text() || c.point_step_accepts_keywords())
&& !c.needs_entity_pick()
});
let has_selection = !tab.scene.selected.is_empty();
let isolation_active = tab.scene.is_isolation_active();
let last_cmds: Vec<String> = self
@@ -1647,6 +1652,7 @@ bg={bg_ms:.1}ms n={view_count}"
isolation_active,
last_cmds,
draworder_open,
has_point_step,
));
}
}