mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-12-26 09:38:37 -07:00
FIX: crash when ams filament list is empty
1.Set the default size of ams filament to 2 jira:NONE Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: Ie985ecfa44cb9fcaf21406303e32bb56e731f351 (cherry picked from commit b4d85663325eb9be1be48e1eee3d3128e31650db)
This commit is contained in:
parent
fd5c390500
commit
0889ff619e
1 changed files with 7 additions and 7 deletions
|
|
@ -103,17 +103,17 @@ namespace Slic3r
|
|||
{
|
||||
// change the color str to real colors
|
||||
std::vector<Color>used_filament_colors;
|
||||
std::vector<std::vector<Color>>ams_filament_colors;
|
||||
std::vector<std::vector<Color>>ams_filament_colors(2);
|
||||
for (auto& item : used_filament_colors_str)
|
||||
used_filament_colors.emplace_back(Color(item));
|
||||
|
||||
for (auto& arr : ams_filament_colors_str) {
|
||||
std::vector<Color>tmp;
|
||||
for (auto& item : arr)
|
||||
tmp.emplace_back(Color(item));
|
||||
ams_filament_colors.emplace_back(std::move(tmp));
|
||||
}
|
||||
|
||||
for (size_t idx = 0; idx < ams_filament_colors_str.size(); ++idx) {
|
||||
std::vector<Color> tmp;
|
||||
for (auto& item : ams_filament_colors_str[idx])
|
||||
tmp.emplace_back(Color(item));
|
||||
ams_filament_colors[idx] = std::move(tmp);
|
||||
}
|
||||
|
||||
int best_cost = std::numeric_limits<int>::max();
|
||||
std::vector<int>best_map;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue