mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-11 09:51:06 +00:00
Read the IDEX/IQEX enum settings back as the values they were saved as
A coEnum config value has two representations: the typed ConfigOptionEnum<T> a config cloned from the static classes carries, and the ConfigOptionEnumGeneric that a config assembled from the option definitions creates - which is what a preset, a project's own settings and the CLI all hold. imex_cfg_enum() accepted only the first, so every IDEX/IQEX reader took the option default instead: a printer saved as rear-left came back front-left in the settings, the bed zones and the carriage markers, while the preset on disk still held rear-left. Read the generic form too, keyed on the value map it carries, since only T's own map yields a T. The last reader that matched on the coEnum tag alone and cast across the two hierarchies now goes through the helper with everything else. Declaring the three keys the static classes were missing is what lets a change to imex_tool_layout invalidate the slice it moves, which it never did before. The two that are only ever drawn stay out of that: a colour scheme and the advisory margin bands do not reach a slice, so changing one must not discard it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
42a47d6bd7
commit
af1cf71a4c
@@ -441,6 +441,12 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n
|
||||
}
|
||||
else if (opt_key == "z_hop_types") {
|
||||
osteps.emplace_back(posDetectOverhangsForLift);
|
||||
}
|
||||
// The bed-zone colour scheme and the advisory margin bands are drawn from the printer
|
||||
// config but never reach the slice: compute_imex_zone_layout keeps the margin out of
|
||||
// primary_zone_box, which is the only part of the layout update_imex_slice_offset reads.
|
||||
// imex_tool_layout does move that box, so it is left to the fallback below.
|
||||
else if (opt_key == "imex_viz_theme" || opt_key == "imex_carriage_margin") {
|
||||
} else {
|
||||
// for legacy, if we can't handle this option let's invalidate all steps
|
||||
//FIXME invalidate all steps of all objects as well?
|
||||
@@ -3907,9 +3913,8 @@ Points Print::first_layer_wipe_tower_corners(bool check_wipe_tower_existance) co
|
||||
// firmware to fan copies out — parts in the wrong place, no diagnostic.
|
||||
//
|
||||
// Inputs, all reachable without a GUI:
|
||||
// * m_full_print_config — the printer preset's IMEX keys. It is the full config rather
|
||||
// than m_config because `imex_tool_layout` and `imex_carriage_margin` are printer-preset
|
||||
// options with no home in the static PrintConfig, so m_config does not carry them.
|
||||
// * m_full_print_config — the printer preset's IMEX keys, read from the full config so this
|
||||
// sees the same values the preset holds whichever representation carries them.
|
||||
// * the plate's `imex_parallel_mode`, read off the object config. That is the same source
|
||||
// GCode.cpp and validate() resolve the active mode from (the plate's own config is
|
||||
// merged into the full config before apply() by BackgroundSlicingProcess in the GUI and
|
||||
|
||||
Reference in New Issue
Block a user