feat(gui): show per-extruder nozzle count with inline editor

The sidebar extruder cards get an interactive title row — "<name> ( <count> )"
with an edit button — showing the extruder's physical nozzle count on
multi-nozzle printers (hidden elsewhere). Clicking it opens the existing
"Set nozzle count" dialog, which now also handles a Hybrid extruder by
offering both Standard and High Flow counts (an empty mix is rejected) and
shows a hotend thumbnail.

Because `extruder_nozzle_stats` is session-only (saved presets never carry
it, so preset switches rebuild the edited config without it), the stats are
re-baselined whenever they are missing: each extruder starts with
extruder_max_nozzle_count nozzles of its selected volume type. Switching an
extruder's flow type carries its total count over to the new type, except
when the stats came from a device sync — the machine-reported per-type
breakdown must survive a manual flow switch.

The badge refreshes on preset load, flow-type change, manual edit, device
sync, and project load. Single-extruder cards keep the title row but never
enable editing.
This commit is contained in:
SoftFever
2026-07-10 19:47:21 +08:00
parent c528d3a0bc
commit 7c8d086d9e
5 changed files with 292 additions and 32 deletions
+3
View File
@@ -209,6 +209,9 @@ public:
static bool should_show_SEMM_buttons();
void show_SEMM_buttons();
void enable_purge_mode_btn(bool enable);
// Sidebar nozzle-count badge on the extruder cards (multi-nozzle printers only).
void set_extruder_nozzle_count(int extruder_id, int nozzle_count);
void enable_nozzle_count_edit(bool enable);
void update_dynamic_filament_list();
PlaterPresetComboBox * printer_combox();