Fix in _3DScene::_load_gcode_extrusion_paths::Helper::path_color()
This commit is contained in:
parent
4cf74d6dcf
commit
e90bc3fcab
1 changed files with 2 additions and 2 deletions
|
@ -2204,7 +2204,7 @@ void _3DScene::_load_gcode_extrusion_paths(const GCodePreviewData& preview_data,
|
|||
return 0.0f;
|
||||
}
|
||||
|
||||
static const GCodePreviewData::Color path_color(const GCodePreviewData& data, const std::vector<float>& tool_colors, float value)
|
||||
static GCodePreviewData::Color path_color(const GCodePreviewData& data, const std::vector<float>& tool_colors, float value)
|
||||
{
|
||||
switch (data.extrusion.view_type)
|
||||
{
|
||||
|
@ -2220,7 +2220,7 @@ void _3DScene::_load_gcode_extrusion_paths(const GCodePreviewData& preview_data,
|
|||
return data.get_volumetric_rate_color(value);
|
||||
case GCodePreviewData::Extrusion::Tool:
|
||||
{
|
||||
static GCodePreviewData::Color color;
|
||||
GCodePreviewData::Color color;
|
||||
::memcpy((void*)color.rgba, (const void*)(tool_colors.data() + (unsigned int)value * 4), 4 * sizeof(float));
|
||||
return color;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue