mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
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:
@@ -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*/)
|
||||
|
||||
Reference in New Issue
Block a user