FIX: Should not enable wrapping detection when switch to X/P/A

jira: STUDIO-13992
Change-Id: I5912891bb0b839e64f9d49aa9ed91d2bfd922dcb
(cherry picked from commit 8c4598d4764aa4126a415efd6ab3d51ab78dedb0)
This commit is contained in:
zhimin.zeng
2025-09-24 10:01:31 +08:00
committed by Noisyfox
parent aa75c444aa
commit 55d8685952

View File

@@ -305,6 +305,15 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con
is_msg_dlg_already_exist = false;
}
if (config->option<ConfigOptionBool>("enable_wrapping_detection")->value) {
std::string printer_type = wxGetApp().preset_bundle->printers.get_edited_preset().get_printer_type(wxGetApp().preset_bundle);
if (!DevPrinterConfigUtil::support_wrapping_detection(printer_type)) {
DynamicPrintConfig new_conf = *config;
new_conf.set_key_value("enable_wrapping_detection", new ConfigOptionBool(false));
apply(config, &new_conf);
}
}
double sparse_infill_density = config->option<ConfigOptionPercent>("sparse_infill_density")->value;
int fill_multiline = config->option<ConfigOptionInt>("fill_multiline")->value;
auto timelapse_type = config->opt_enum<TimelapseType>("timelapse_type");
@@ -933,9 +942,8 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co
toggle_line("infill_overhang_angle", config->opt_enum<InfillPattern>("sparse_infill_pattern") == InfillPattern::ipLateralHoneycomb);
ConfigOptionPoints *wrapping_exclude_area_opt = wxGetApp().preset_bundle->printers.get_edited_preset().config.option<ConfigOptionPoints>("wrapping_exclude_area");
bool support_wrapping_detect = wrapping_exclude_area_opt &&wrapping_exclude_area_opt->values.size() > 3;
toggle_line("enable_wrapping_detection", support_wrapping_detect);
std::string printer_type = wxGetApp().preset_bundle->printers.get_edited_preset().get_printer_type(wxGetApp().preset_bundle);
toggle_line("enable_wrapping_detection", DevPrinterConfigUtil::support_wrapping_detection(printer_type));
}
void ConfigManipulation::update_print_sla_config(DynamicPrintConfig* config, const bool is_global_config/* = false*/)