fix(preset): don't truncate child variant vectors to parent size on load (#13316)

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Clifford
2026-05-08 15:03:39 -04:00
committed by GitHub
parent 1411f95434
commit 7aed2dc8bd
2 changed files with 57 additions and 0 deletions

View File

@@ -9641,6 +9641,13 @@ void DynamicPrintConfig::update_non_diff_values_to_base_config(DynamicPrintConfi
//nothing to do, keep the original one
}
else {
// Guard: set_with_restore is parent-shaped and would truncate the child's
// vector when the child has more extruders than the parent (e.g. an IDEX
// preset inheriting from a single-nozzle base). The child's saved value is
// authoritative for its own extruder count, so skip the merge for this key.
if (cur_variant_count > target_variant_count)
continue;
int stride = 1;
if (key_set2.find(opt) != key_set2.end())
stride = 2;