Files
OneCAD/crates/ui-egui/tests/scenarios/s49_sketch_point_toolbar.json
T
Karl Von Richter 04cfb74c5e feat: Group sketch creation tools and remember variants per part (#589)
Sketch Create groups its drawing tools under Line, Rectangle, Circle, Arc, Slot, Polygon and Spline. Each family's main button starts the part's last-used variant and its caret lists the others; choices are per open part, kept across sketch sessions and tab switches, and never touch the design or undo history.

Co-authored-by: Karl Von Richter <karl@von-richter.net>
2026-10-13 04:49:28 -04:00

28 lines
1.5 KiB
JSON

[
{"note":"#191: Point remains a default Sketch CREATE button alongside the drawing families."},
{"call":"engine.execute","params":{"command":"sketch.create","params":{"plane":"XY"}}},
{"expect":{"shown_handles":["button:sketch.line","family:Rectangle","family:Circle","family:Arc","family:Slot","family:Polygon","family:Spline","button:sketch.point"]}},
{"click":{"handle":"button:sketch.point"}},
{"expect":{"tool":"sketch.point","dialog":null}},
{"click":{"sketch":[20,15]}},
{"key":"Escape"},
{"expect":{"errors":0,"sketch_world":{"point":"p1","at":[20,15,0]}}},
{"call":"ui.menu","params":{"x":400,"y":80,"target":{"type":"toolbar_command","id":"sketch.point"}}},
{"call":"ui.menuPick","params":{"item":"Remove from Toolbar"}},
{"expect":{"hidden_handles":["button:sketch.point"]}},
{"restart":"close"},
{"call":"engine.execute","params":{"command":"sketch.create","params":{"plane":"XY"}}},
{"expect":{"hidden_handles":["button:sketch.point"]}},
{"click":{"handle":"panel:SKETCH:CREATE"}},
{"expect":{"shown_handles":["dropdown:sketch.point"]}},
{"click":{"handle":"dropdown:sketch.point"}},
{"key":"Escape"},
{"call":"ui.menu","params":{"x":400,"y":80,"target":{"type":"toolbar"}}},
{"call":"ui.menuPick","params":{"item":"Reset Toolbar"}},
{"expect":{"shown_handles":["button:sketch.point","button:sketch.line"],"errors":0}},
{"call":"ui.resize","params":{"width":640,"height":720}},
{"click":{"handle":"panel:SKETCH:CREATE"}},
{"click":{"handle":"dropdown:sketch.point"}},
{"expect":{"tool":"sketch.point","errors":0}}
]