fix(gui): resolve unknown command and style token errors at startup
Move ZTools command imports before workbench initialization in InitGui.py so commands are registered before PartDesign/Sketcher init triggers toolbar state restoration. Import silo_commands eagerly in _setup_silo_menu() so Silo commands exist before the WorkbenchManipulator references them. Create KindredCreate.yaml and Classic.yaml theme parameter files defining all style tokens (PrimaryColor, TextForegroundColor, etc.) used by FreeCAD.qss and the overlay stylesheet. Register them in CMakeLists.txt and set the Theme preference in KindredCreate.cfg. Add migration in migrateOldTheme() to set Theme=KindredCreate for existing users who have the stylesheet but not the Theme parameter.
This commit is contained in:
@@ -68,6 +68,9 @@ def _check_silo_first_start():
|
||||
def _setup_silo_menu():
|
||||
"""Inject Silo commands into the File menu and toolbar across all workbenches."""
|
||||
try:
|
||||
# Import silo_commands eagerly so commands are registered before the
|
||||
# manipulator tries to add them to toolbars/menus.
|
||||
import silo_commands # noqa: F401
|
||||
|
||||
class SiloMenuManipulator:
|
||||
def modifyMenuBar(self):
|
||||
|
||||
Reference in New Issue
Block a user