mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-04 06:11:02 +00:00
* Keep User Preset Values on Extruder Variants They Don't List A user preset stores the variant list its parent had when it was saved. When the parent later gains variants, update_diff_values_to_child_config matched variants by name only and left the new ones at the parent's value, so the user's settings were silently replaced there, and a re-save wrote the system values into the user's file. An unmatched parent variant now takes the child's first variant of the same extruder, the rule slicing already uses in get_config_index_base. A child without a variant list covers the parent's first extruder. The name match also no longer indexes the child's extruder ids when it has none. * Share One Variant Column Rule Between Slicing, User Presets and Projects Three places chose which variant column a value comes from, each with its own copy of "the same variant and owner, else the owner's first column": get_config_index_base when slicing, the user preset merge in update_diff_values_to_child_config, and normalize_filament_values_to_variants for projects and the CLI. find_variant_column now holds that rule and map_variant_columns applies it to a variant list, so a change to how missing variants are filled reaches all three. Each caller keeps its own copy step. There is no behaviour change: G-code is identical before and after. The one relaxation is that get_config_index_base no longer reads past a short id list when its two lists differ in length, which its assert already rules out. * Rename variant column helpers to variant index --------- Co-authored-by: SoftFever <softfeverever@gmail.com>
OrcaSlicer tests
Building, running and writing tests is documented on the wiki, under How to Test.
Two files here rather than there, because coding agents only read what is in the repository: