bug: "Reset to defaults" reverts to FreeCAD defaults, not Create defaults #229
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Summary
"Reset to defaults" in Preferences (Edit → Preferences → Reset All / Reset Page / Reset Group) reverts settings to upstream FreeCAD hardcoded defaults rather than Kindred Create defaults. This means the Catppuccin theme, toolbar layout, unit preferences, and other Create-specific settings are lost.
Root Cause
DlgPreferencesImp::restoreDefaults()insrc/Gui/Dialogs/DlgPreferencesImp.cpp:814callsParameterManager::Clear()which wipes the entireUser parameterXML tree. After clearing, widgets reload their values usingGet*()calls with hardcoded FreeCAD fallback values (e.g.GetInt("UserSchema", 0)). There is no Create-specific defaults file or preference pack — the "defaults" are whatever upstream FreeCAD coded as fallbacks.The per-page
resetSettingsToDefaults()insrc/Gui/PropertyPage.cpp:218has the same issue — it removes user parameters viaRemoveAttribute(), causing widgets to fall back to FreeCAD defaults.Expected Behavior
Resetting to defaults should restore the Kindred Create baseline configuration: Catppuccin Mocha theme, Create toolbar layout, default unit preferences, etc.
Proposed Fix
Implement a Create defaults mechanism — options include:
create-defaults.cfgthat is loaded afterClear()to re-populate Create baseline parametersPreferencePackManagerto define a "Kindred Create" preference pack as the reset targetAffected Files
src/Gui/Dialogs/DlgPreferencesImp.cpp—restoreDefaults()(line ~814)src/Gui/PropertyPage.cpp—resetSettingsToDefaults()(line ~218)src/Gui/PreferencePages/DlgSettingsGeneral.cpp— page-level reset