mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-11 01:41:03 +00:00
Centralize the project→printer→printer_extruder_id fallback for the physical extruder map. PrintApply, PartPlate (ghost color + cache key), Plater (tooltip + click gate) all previously open-coded the three-step lookup, and each handled the "pem unset, derive from pei" case slightly differently — an IDEX printer without an explicit pem could paint an UNPRINTABLE_COLOR ghost even though the slicer would have derived a valid mapping. - IMEXHelpers: add effective_physical_extruder_map(explicit_pem, pei) and a PresetBundle overload that wraps the project→printer precedence. - PrintApply: use the helper in place of the inline pei→pem normalization. - PartPlate / Plater: call the PresetBundle overload at every ghost-color, ghost-cache-key, tooltip, and click-gate site. - Plater::format_imex_ghost_tooltip: when no filament resolves to a head, surface an actionable message directing the user to extend the extruder count in the Machine tab, instead of the generic "(no filament routed)". - IMEXFilamentPickerPopover: hold m_pem by value so callers can pass a stack-local derived pem without lifetime worries. - Tests: 5 new cases covering explicit-wins, default-pem fallback, null inputs, and the IDEX ghost-color regression that motivated this. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>