mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-11-25 06:47:48 -05:00
Closes review comment 9. PartPlate::reset_imex_mode() had no callers, while the PR description said deleting a mode resets affected plates to Primary. IMEXModesCtrl now exposes an on_mode_removed callback that TabPrinter::build_fff handles by resetting every plate whose mode matches the deleted row, under a single undo snapshot, followed by the same dirty/update sequence the plate's own mode button runs. Wired to deletion only, on purpose: the name field notifies on every keystroke, so routing renames through the same path would orphan and reset the plate on the first character typed. Renames stay covered by the slice-time fallback and its warning. The callback is copied to a local before notify(), because notify() reaches load_from_config() -> clear_rows(), which tears down the row the handler is running inside. The rest of this file is the modes editor moving out to its own translation unit, leaving the include and the construction site. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>