fix(gui): complete toolbar whitelists in EditingContextResolver #301
Reference in New Issue
Block a user
Delete Branch "fix/toolbar-context-whitelists"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The
EditingContextResolvercontrols toolbar visibility via explicit whitelists — each editing context names the toolbars it wants shown, and all others are hidden. Several context definitions had incomplete lists, causing workbench toolbars to be missing compared to base FreeCAD.Most visibly, the Part Design workbench was missing the Sketcher toolbar (can't create new sketches from body context), and the lower-priority contexts (empty body, workbench fallback) only showed 2 of the 5 expected toolbars.
Root Cause
In
EditingContextResolver::registerBuiltinContexts()(src/Gui/EditingContext.cpp), the.toolbarsarrays were incomplete for 6 of the 11 built-in contexts.Changes
partdesign.featurepartdesign.bodypartdesign.workbenchsketcher.workbenchassembly.idleassembly.workbenchNo changes to
sketcher.editorassembly.edit— those were already correct.Verification
The EditingContextResolver controls toolbar visibility via explicit whitelists per editing context. Several contexts had incomplete lists, causing workbench toolbars to be missing compared to base FreeCAD. Changes: partdesign.feature (priority 40): - Add 'Sketcher' toolbar so users can create new sketches from an active Body with features partdesign.body (priority 30): - Add Modeling, Dress-Up, and Transformation toolbars (previously only showed Helper + Sketcher) partdesign.workbench (priority 20): - Add Modeling, Dress-Up, and Transformation toolbars (same as body) sketcher.workbench (priority 20): - Add Geometries, Constraints, B-Spline Tools, Visual Helpers (previously only showed Sketcher + Sketcher Tools) assembly.idle (priority 30): - Add 'Assembly Joints' and 'Assembly Management' toolbars assembly.workbench (priority 20): - Add 'Assembly Joints' and 'Assembly Management' toolbars No changes to sketcher.edit or assembly.edit contexts — those were already correct.