mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-01-30 21:00:49 -07:00
Fix crash in filament/color print view
This commit is contained in:
parent
9bee05744d
commit
2cb5b02708
1 changed files with 3 additions and 2 deletions
|
|
@ -878,8 +878,9 @@ void GCodeViewer::load_as_gcode(const GCodeProcessorResult& gcode_result, const
|
|||
|
||||
// collect color print colors
|
||||
libvgcode::Palette color_print_colors;
|
||||
color_print_colors.reserve(str_color_print_colors.size());
|
||||
for (const std::string& color : str_color_print_colors) {
|
||||
const std::vector<std::string>& str_colors = str_color_print_colors.empty() ? str_tool_colors : str_color_print_colors;
|
||||
color_print_colors.reserve(str_colors.size());
|
||||
for (const std::string& color : str_colors) {
|
||||
color_print_colors.emplace_back(libvgcode::convert(color));
|
||||
}
|
||||
m_viewer.set_color_print_colors(color_print_colors);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue