mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-10 17:21:10 +00:00
Felix14-v2 PR review feedback (https://github.com/OrcaSlicer/OrcaSlicer/pull/13086#issuecomment-4323696312) plus the slice-time validation work that follows from his bug list. UI polish: - Capitalize "Primary" in display (right-click mode menu, plate tooltip). Sentinel stays lowercase for wire compatibility. - Pre-slice-warnings checkbox now uses Orca's ::CheckBox so it matches the green toggle style of the rest of the IDEX/IQEX configuration page. - DPI-scaled the IMEXModesCtrl (modes editor) sub-panels, button grid, text wraps, gcode textarea, and the ghost-tooltip swatch (imgui.scaled). Legend swatches sized to body-text height for visual balance. - Primary mode tool buttons in the modes editor are now disabled (read- only): cycling roles on the IMEX-off mode is a no-op and confusing. - Modes editor sub-panels now explicitly inherit the app's window-default dark colour so chromeless ScalableButtons don't render with a visible light box around their icons on GTK dark themes. - Per-mode-line reset arrows in the modes editor: each row gets a small reset bitmap that snaps that row's name+tools+gcode triplet back to the saved preset's value. matches_config() guard on the page-level reload prevents the textbox-being-typed-into from being destroyed mid-keystroke. - New View menu item "Show IDEX/IQEX Toolhead" — toggles the per-carriage footprint boxes during G-code preview playback. Gated to Preview tab + IMEX printer; backed by app_config so it persists. Coordinated config migrations: - imex_tool_layout and imex_viz_theme migrate from coString to coEnum (ImexToolLayout / ImexVizTheme). Existing wire format preserved so saved presets and 3MFs deserialize unchanged. Side-benefit: both now pick up standard Field rendering and so finally show reset arrows. Slice-time safeguards (the validation half): - imex_suppresses_bare_toolchange(parallel_mode, count): suppresses the slicer's bare T<n> at print-start in any IMEX parallel mode (the user's imex_mode_gcode + machine_start_gcode owns tool activation there). Mid- print T<n> emits normally — Print::validate blocks the configurations where mid-print T<n> wouldn't make sense. Applied to both code paths inside GCode::set_extruder (the long multi-extruder path AND the single-extruder path that fires when multiple_extruders=false). - imex_multicolor_block_reason(): hard-stop validator returning a user- facing reason string when the active IMEX configuration can't physically support multi-color. Catches IDEX (1 tool/gantry), 2-tool-active IQEX (no within-gantry swap topology), and any MMU/AFC lane sharing among used filaments. Wired into Print::validate as a slice blocker, and into PartPlate::has_imex_multimaterial_conflict so the plater badge agrees with the slice block (no more false positives where the badge warns but the slice goes through). - New imex_mode_types config option (parallel array to imex_mode_names) and imex_mode_type_for() helper. Mode-type tag drives behaviour: zones, ghosts, and validation interpret modes differently per type. Initial types: "primary", "copy", "mirror", "split". Split modes are explicitly designed for paired-gantry IQEX multi-color and bypass the gantry-pair check in imex_multicolor_block_reason (MMU sharing still blocks them). Test coverage: - New unit tests cover imex_suppresses_bare_toolchange (4 cases), imex_multicolor_block_reason (8 cases including IDEX, IQEX 2-/4-tool- active, MMU sharing, missing primary, Split type), and imex_mode_type_for (3 cases including legacy fallback). Total: 186 IMEX assertions across 71 test cases, all passing. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>