mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-02 18:12:43 +00:00
Fixed a GCode preview crash on Linux due to returning a reference to temporary (issue #872)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user