FIX: wipe does not show when raft layers is not zero

Change-Id: I5c1cf1a3003aabd35b4a91073bc950fe772dbb00
(cherry picked from commit e3202e8bf2b40688ffc741cb9f1d87ec591a77f3)
This commit is contained in:
zhimin.zeng 2023-01-13 09:35:24 +08:00 committed by Lane.Wei
parent b94271c750
commit 321785e82e

View file

@ -1152,6 +1152,7 @@ std::vector<int> PartPlate::get_extruders(bool conside_custom_gcode) const
int glb_support_intf_extr = glb_config.opt_int("support_interface_filament");
int glb_support_extr = glb_config.opt_int("support_filament");
bool glb_support = glb_config.opt_bool("enable_support");
glb_support |= glb_config.opt_int("raft_layers") > 0;
for (int obj_idx = 0; obj_idx < m_model->objects.size(); obj_idx++) {
if (!contain_instance_totally(obj_idx, 0))
@ -1165,8 +1166,13 @@ std::vector<int> PartPlate::get_extruders(bool conside_custom_gcode) const
bool obj_support = false;
const ConfigOption* obj_support_opt = mo->config.option("enable_support");
if (obj_support_opt != nullptr)
obj_support = obj_support_opt->getBool();
const ConfigOption *obj_raft_opt = mo->config.option("raft_layers");
if (obj_support_opt != nullptr || obj_raft_opt != nullptr) {
if (obj_support_opt != nullptr)
obj_support = obj_support_opt->getBool();
if (obj_raft_opt != nullptr)
obj_support |= obj_raft_opt->getInt() > 0;
}
else
obj_support = glb_support;