bug: "Reset to defaults" reverts to FreeCAD defaults, not Create defaults #229

Closed
opened 2026-02-15 00:34:46 +00:00 by forbes · 0 comments
Owner

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() in src/Gui/Dialogs/DlgPreferencesImp.cpp:814 calls ParameterManager::Clear() which wipes the entire User parameter XML tree. After clearing, widgets reload their values using Get*() 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() in src/Gui/PropertyPage.cpp:218 has the same issue — it removes user parameters via RemoveAttribute(), 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:

  1. Create defaults config file — ship a create-defaults.cfg that is loaded after Clear() to re-populate Create baseline parameters
  2. Preference pack — use FreeCAD's existing PreferencePackManager to define a "Kindred Create" preference pack as the reset target
  3. InitGui.py initialization — set Create defaults programmatically during startup, and call the same logic after reset

Affected Files

  • src/Gui/Dialogs/DlgPreferencesImp.cpprestoreDefaults() (line ~814)
  • src/Gui/PropertyPage.cppresetSettingsToDefaults() (line ~218)
  • src/Gui/PreferencePages/DlgSettingsGeneral.cpp — page-level reset
## 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()` in `src/Gui/Dialogs/DlgPreferencesImp.cpp:814` calls `ParameterManager::Clear()` which wipes the entire `User parameter` XML tree. After clearing, widgets reload their values using `Get*()` 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()` in `src/Gui/PropertyPage.cpp:218` has the same issue — it removes user parameters via `RemoveAttribute()`, 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: 1. **Create defaults config file** — ship a `create-defaults.cfg` that is loaded after `Clear()` to re-populate Create baseline parameters 2. **Preference pack** — use FreeCAD's existing `PreferencePackManager` to define a "Kindred Create" preference pack as the reset target 3. **InitGui.py initialization** — set Create defaults programmatically during startup, and call the same logic after reset ## Affected Files - `src/Gui/Dialogs/DlgPreferencesImp.cpp` — `restoreDefaults()` (line ~814) - `src/Gui/PropertyPage.cpp` — `resetSettingsToDefaults()` (line ~218) - `src/Gui/PreferencePages/DlgSettingsGeneral.cpp` — page-level reset
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kindred/create#229