mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-01-30 12:50:50 -07:00
Fix multi-tool printer filament UI issue (#11957)
This commit is contained in:
parent
8225d642d0
commit
9b8f3e2662
1 changed files with 10 additions and 1 deletions
|
|
@ -6835,7 +6835,16 @@ void GUI_App::load_current_presets(bool active_preset_combox/*= false*/, bool ch
|
|||
if (check_printer_presets_)
|
||||
check_printer_presets();
|
||||
|
||||
PrinterTechnology printer_technology = preset_bundle->printers.get_edited_preset().printer_technology();
|
||||
auto& edited_printer_preset = preset_bundle->printers.get_edited_preset();
|
||||
PrinterTechnology printer_technology = edited_printer_preset.printer_technology();
|
||||
// ORCA: Sync filament count with the printer's nozzle count before loading presets for multi-tool printers.
|
||||
// This ensures filament_presets vector is properly sized when combo boxes are created/updated.
|
||||
if (printer_technology == ptFFF && !edited_printer_preset.config.opt_bool("single_extruder_multi_material")) {
|
||||
auto* nozzle_diameter = edited_printer_preset.config.option<ConfigOptionFloats>("nozzle_diameter");
|
||||
if (nozzle_diameter) {
|
||||
preset_bundle->set_num_filaments(nozzle_diameter->values.size());
|
||||
}
|
||||
}
|
||||
this->plater()->set_printer_technology(printer_technology);
|
||||
for (Tab *tab : tabs_list)
|
||||
if (tab->supports_printer_technology(printer_technology)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue