FIX: sync extruder info when select preset

when the connected machine is mutli_extruer and is the same as preset
2. fix the filament unprintable check bug
jira: STUDIO-10047

Change-Id: I4e78003f080897d5b43c0a742852078b149eba45
This commit is contained in:
zhimin.zeng 2025-01-22 11:44:07 +08:00 committed by lane.wei
parent 29b0be89eb
commit 1fbc179ae4
2 changed files with 12 additions and 1 deletions

View File

@ -1314,7 +1314,7 @@ std::vector<int> PartPlate::get_used_filaments()
bool PartPlate::check_filament_printable(const DynamicPrintConfig &config, wxString& error_message)
{
error_message.clear();
FilamentMapMode mode = config.option<ConfigOptionEnum<FilamentMapMode>>("filament_map_mode")->value;
FilamentMapMode mode = this->get_real_filament_map_mode(config);
// only check printablity if we have explicit map result
if (mode != fmmManual)
return true;

View File

@ -7937,6 +7937,17 @@ void Plater::priv::on_select_preset(wxCommandEvent &evt)
// update plater with new config
q->on_config_change(wxGetApp().preset_bundle->full_config());
});
// sync extruder info when select multi_extruder preset
if (Slic3r::DeviceManager *dev = Slic3r::GUI::wxGetApp().getDeviceManager()) {
MachineObject *obj = dev->get_selected_machine();
if (obj && obj->is_multi_extruders()) {
PresetBundle *preset_bundle = wxGetApp().preset_bundle;
if (preset_bundle->printers.get_edited_preset().get_printer_type(preset_bundle) == obj->printer_type) {
GUI::wxGetApp().sidebar().sync_extruder_list();
}
}
}
} else {
// BBS
// wxWindowUpdateLocker noUpdates1(sidebar->print_panel());