fix(ui): put Point on the default sketch toolbar (#445)

This commit is contained in:
selune authored and GitHub committed 2026-10-12 20:13:31 -04:00
1 parent 809ecf781e
commit 5c7149e57d
5 files changed
+48 -3

No files matched your search

+15 -2
View File
@@ -1,5 +1,5 @@
//! Toolbar layout of the tabs that share commands with others (Fusion's layout): the SOLID
//! tab's ASSEMBLE panel, SHEET METAL and PLASTIC. A command is registered on one tab and panel;
//! Explicit toolbar layouts: Sketch CREATE, the SOLID tab's ASSEMBLE panel, SHEET METAL and
//! PLASTIC. A command is registered on one tab and panel;
//! these panels list the commands they show in order (the first few get big buttons), so Extrude
//! or Joint appear on several tabs. Commands registered on such a panel but not listed follow at
//! the end.
@@ -100,6 +100,19 @@ pub fn panels(tab: &str) -> Option<&'static [&'static str]> {
/// to the registry.
pub fn layout<'a>(tab: &str, panel: &str, specs: &[&'a CommandSpec]) -> Option<(Vec<&'a CommandSpec>, usize)> {
let (ids, promoted, own_tab): (&[&str], usize, &str) = match (tab, panel) {
("SKETCH", "CREATE") => (
&[
"sketch.line",
"sketch.rectangle.two_point",
"sketch.rectangle.three_point",
"sketch.rectangle.center",
"sketch.circle.center",
"sketch.circle.two_point",
"sketch.point",
],
7,
tab,
),
("SOLID", "CONFIGURE") => (&["parameters.change", "config.table"], 2, tab),
("SOLID" | "SHEET METAL" | "PLASTIC", "ASSEMBLE") => (ASSEMBLE, 3, tab),
("SHEET METAL", "CREATE") => (SHEET_CREATE, 3, tab),