diff --git a/mods/silo b/mods/silo index 3dd0da3964..dc64a66f0f 160000 --- a/mods/silo +++ b/mods/silo @@ -1 +1 @@ -Subproject commit 3dd0da39648d756cc5df0fab757a85d01c3bae6e +Subproject commit dc64a66f0f397d2f9ba58377d88f4cbafebd408e diff --git a/src/Gui/Dialogs/DlgPreferencesImp.cpp b/src/Gui/Dialogs/DlgPreferencesImp.cpp index 8a2ae44905..a7a0a3e70b 100644 --- a/src/Gui/Dialogs/DlgPreferencesImp.cpp +++ b/src/Gui/Dialogs/DlgPreferencesImp.cpp @@ -66,8 +66,10 @@ #include "Dialogs/DlgPreferencesImp.h" #include "ui_DlgPreferences.h" +#include "Application.h" #include "BitmapFactory.h" #include "MainWindow.h" +#include "PreferencePackManager.h" #include "Tools.h" #include "WidgetFactory.h" @@ -834,6 +836,12 @@ void DlgPreferencesImp::restoreDefaults() .GetParameterGroupByPath("User parameter:BaseApp/Preferences/General") ->SetBool("SaveUserParameter", saveParameter); + // Re-apply Kindred Create defaults so we don't revert to upstream FreeCAD defaults + auto* packMgr = Gui::Application::Instance->prefPackManager(); + if (packMgr) { + packMgr->apply("KindredCreate"); + } + reject(); } } diff --git a/src/Gui/EditingContext.cpp b/src/Gui/EditingContext.cpp index 73133a98f5..5794061892 100644 --- a/src/Gui/EditingContext.cpp +++ b/src/Gui/EditingContext.cpp @@ -36,6 +36,7 @@ #include "ToolBarManager.h" #include "ViewProvider.h" #include "ViewProviderDocumentObject.h" +#include "WorkbenchManager.h" using namespace Gui; @@ -330,6 +331,49 @@ void EditingContextResolver::registerBuiltinContexts() }, }); + // --- Workbench-level fallbacks (priority 20) --- + // Show basic workbench toolbars when the workbench is active but no + // specific editing context matches (e.g. no Body selected in PartDesign). + + registerContext({ + /*.id =*/QStringLiteral("partdesign.workbench"), + /*.labelTemplate =*/QStringLiteral("Part Design"), + /*.color =*/QLatin1String(CatppuccinMocha::Mauve), + /*.toolbars =*/ + {QStringLiteral("Part Design Helper Features"), QStringLiteral("Sketcher")}, + /*.priority =*/20, + /*.match =*/ + []() { + return WorkbenchManager::instance()->activeName() == "PartDesignWorkbench"; + }, + }); + + registerContext({ + /*.id =*/QStringLiteral("sketcher.workbench"), + /*.labelTemplate =*/QStringLiteral("Sketcher"), + /*.color =*/QLatin1String(CatppuccinMocha::Green), + /*.toolbars =*/ + {QStringLiteral("Sketcher"), QStringLiteral("Sketcher Tools")}, + /*.priority =*/20, + /*.match =*/ + []() { + return WorkbenchManager::instance()->activeName() == "SketcherWorkbench"; + }, + }); + + registerContext({ + /*.id =*/QStringLiteral("assembly.workbench"), + /*.labelTemplate =*/QStringLiteral("Assembly"), + /*.color =*/QLatin1String(CatppuccinMocha::Blue), + /*.toolbars =*/ + {QStringLiteral("Assembly")}, + /*.priority =*/20, + /*.match =*/ + []() { + return WorkbenchManager::instance()->activeName() == "AssemblyWorkbench"; + }, + }); + // --- Empty document --- registerContext({ /*.id =*/QStringLiteral("empty_document"), diff --git a/src/Gui/Stylesheets/KindredCreate.qss b/src/Gui/Stylesheets/KindredCreate.qss index c5a239a9f3..5025fb8ae8 100644 --- a/src/Gui/Stylesheets/KindredCreate.qss +++ b/src/Gui/Stylesheets/KindredCreate.qss @@ -1207,6 +1207,7 @@ Gui--OriginSelectorWidget { padding: 4px 8px; min-width: 70px; max-width: 120px; + min-height: 20px; } Gui--OriginSelectorWidget:hover {