mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-23 08:41:11 -06:00
Fixed a GCode preview crash on Linux due to returning a reference to temporary (issue #872)
This commit is contained in:
parent
9af6a89f20
commit
d89f8128cd
3 changed files with 3 additions and 5 deletions
|
@ -275,7 +275,7 @@ bool GCodePreviewData::empty() const
|
|||
return extrusion.layers.empty() && travel.polylines.empty() && retraction.positions.empty() && unretraction.positions.empty();
|
||||
}
|
||||
|
||||
const GCodePreviewData::Color& GCodePreviewData::get_extrusion_role_color(ExtrusionRole role) const
|
||||
GCodePreviewData::Color GCodePreviewData::get_extrusion_role_color(ExtrusionRole role) const
|
||||
{
|
||||
return extrusion.role_colors[role];
|
||||
}
|
||||
|
|
|
@ -187,7 +187,7 @@ public:
|
|||
void reset();
|
||||
bool empty() const;
|
||||
|
||||
const Color& get_extrusion_role_color(ExtrusionRole role) const;
|
||||
Color get_extrusion_role_color(ExtrusionRole role) const;
|
||||
Color get_height_color(float height) const;
|
||||
Color get_width_color(float width) const;
|
||||
Color get_feedrate_color(float feedrate) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue