Fix active filament preset not matching wizard selection on first run (#12132)

* Fix active filament preset not matching wizard selection on first run

After completing the setup wizard with only a non-PLA filament selected
(e.g. Generic ABS), the active filament preset defaulted to Generic PLA
instead of the user's selection. This happened because load_presets()
falls back to Generic PLA when the initial printer differs from the
preferred printer, and the first_added_filament override was disabled.

Add post-load correction in apply_config() that switches the active
filament to the first compatible wizard-selected filament when the
current active filament is not in the wizard selection. Also fix the
guide JS (22.js, 23.js) to use the filalist attribute for building
the filament array, and add platform-specific build test commands to
CLAUDE.md.

* Replace @System filaments with vendor-specific overrides in wizard

When the wizard selects a generic filament like "Generic ABS @System",
check if a vendor-specific override exists (e.g. BBL "Generic ABS")
and use that instead. This ensures printer-tuned profiles are preferred,
preventing load_installed_filaments from adding unwanted BBL defaults.

When printers from the default bundle are also selected, both variants
are kept since those printers need the @System version.

Also adds diagnostic logging for filament loading in LoadProfileFamily.

* Guard against persisting presets for Default Printer and fix filament override logic

Prevent export_selections from saving stale preset settings for the
built-in "Default Printer" placeholder, which is only the initial state
before a real printer is loaded. Also require a non-default vendor printer
to be selected before replacing @System filaments with vendor-specific
overrides in the wizard, avoiding incorrect filament substitution when
only the default bundle is present.
This commit is contained in:
SoftFever
2026-02-01 21:34:14 +08:00
committed by GitHub
parent 3a056f2aa3
commit 977a66be39
5 changed files with 98 additions and 17 deletions

View File

@@ -70,6 +70,25 @@ build_release_vs2022.bat slicer
./build_linux.sh -c # clean build
./build_linux.sh -r # skip RAM/disk checks
./build_linux.sh -l # use Clang instead of GCC
```
### Build test:
**Always use this command to build the project when testing build issues on Windows.**
```bash
cmake --build . --config %build_type% --target ALL_BUILD -- -m
```
### Building on macOS
**Always use this command to build the project when testing build issues on macOS.**
```bash
cmake --build build/arm64 --config RelWithDebInfo --target all --
```
### Building on Linux
**Always use this command to build the project when testing build issues on Linux.**
```bash
cmake --build build/arm64 --config RelWithDebInfo --target all --
```
### Build System