Migrate the IDEX/IQEX config keys testers already have

The parallel printing options shipped to testers as is_ixex and ixex_*,
became is_imex and imex_* when the feature stopped being called iXex, and
the two clearance keys were renamed once more to say what they measure:
nozzle to carriage edge on the collision side, not the carriage's full
width. Nothing translated any of it, so loading an existing printer profile
dropped every one of these values - the keys are unknown and cleared.
is_ixex is the one that matters most, because without it the others migrate
into a feature that stays switched off, leaving settings that look
configured and do nothing.

Per-plate mode is persisted twice and only one path went through
handle_legacy. Plate metadata in a 3MF is matched by exact attribute name
and written with set_key_value, so a project saved between the per-plate
mode landing and the rename loaded every plate back on Primary and sliced
single-carriage with no warning. The loader now accepts the old attribute
name.

ixex_primary_col and ixex_primary_row are dropped rather than mapped: the
primary is a role inside the mode's active-tools string now, not a grid
coordinate, and they were never in an option list, so no saved file carries
them.

The test drives the full era-1 key list and asserts the enum values rather
than non-nullness, since a forward-compatible substitution would otherwise
hide a failed deserialize behind a default. handle_legacy had no test before
this.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Clifford Garwood
2026-09-18 01:32:27 -04:00
co-authored by Claude Opus 5
parent f7a08b0868
commit b6f690a65c
3 changed files with 89 additions and 1 deletions
+18
View File
@@ -9331,6 +9331,24 @@ void PrintConfigDef::handle_legacy(t_config_option_key &opt_key, std::string &va
else if (opt_key == "wall_direction" && value == "auto") {
value = "ccw";
}
// Orca: the IDEX/IQEX parallel printing keys shipped to testers as ixex_* before the feature
// was renamed IMEX, and the two clearance keys were renamed again to say what they measure:
// nozzle to carriage edge on the collision side, not the carriage's full width. Without this
// an existing printer profile loses every one of these values silently.
// is_ixex is the master gate: without it every other key below migrates into a feature that
// stays switched off, which is worse than losing them all, because the settings then look
// configured. ixex_primary_col/_row are the only era-1 keys with no modern counterpart (the
// primary is a role in the mode's tools string now); they were never in an option list, so no
// saved file carries them, and the has() check at the end of this function drops them anyway.
else if (opt_key == "is_ixex") {
opt_key = "is_imex";
} else if (opt_key.compare(0, 5, "ixex_") == 0) {
opt_key = "imex_" + opt_key.substr(5);
if (opt_key == "imex_carriage_width_x")
opt_key = "imex_nozzle_clearance_x";
else if (opt_key == "imex_carriage_width_y")
opt_key = "imex_nozzle_clearance_y";
}
// Ignore the following obsolete configuration keys:
static std::set<std::string> ignore = {