mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 11:53:48 +00:00
ENH: CLI: fix some potential issue under cli
jira: no-jira Change-Id: I411e7a18b0eacc27f28a4b6d2205cd6460b6cd1a (cherry picked from commit 84bbf31ab5d4a30afde7c512147fcbe9b85fb57b)
This commit is contained in:
@@ -3030,8 +3030,13 @@ int CLI::run(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
opt_vec_dst->set_at(opt_vec_src, filament_index-1, 0);
|
if (current_is_multi_extruder && !new_is_multi_extruder && filament_options_with_variant.find(opt_key) != filament_options_with_variant.end()) {
|
||||||
|
if (opt_vec_dst->size() > filament_count)
|
||||||
|
opt_vec_dst->resize(filament_count);
|
||||||
|
}
|
||||||
|
opt_vec_dst->set_at(opt_vec_src, filament_index - 1, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5485,6 +5490,10 @@ int CLI::run(int argc, char **argv)
|
|||||||
std::vector<int>& final_filament_maps = new_print_config.option<ConfigOptionInts>("filament_map", true)->values;
|
std::vector<int>& final_filament_maps = new_print_config.option<ConfigOptionInts>("filament_map", true)->values;
|
||||||
if (final_filament_maps.size() < filament_count)
|
if (final_filament_maps.size() < filament_count)
|
||||||
final_filament_maps.resize(filament_count, 1);
|
final_filament_maps.resize(filament_count, 1);
|
||||||
|
if (new_extruder_count == 1) {
|
||||||
|
for (int index = 0; index < filament_count; index++)
|
||||||
|
final_filament_maps[index] = 1;
|
||||||
|
}
|
||||||
print->apply(model, new_print_config);
|
print->apply(model, new_print_config);
|
||||||
BOOST_LOG_TRIVIAL(info) << boost::format("set no_check to %1%:")%no_check;
|
BOOST_LOG_TRIVIAL(info) << boost::format("set no_check to %1%:")%no_check;
|
||||||
print->set_no_check_flag(no_check);//BBS
|
print->set_no_check_flag(no_check);//BBS
|
||||||
|
|||||||
Reference in New Issue
Block a user