mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 08:55:58 +08:00
Fixed out of bounds when showing color prints in gcode preview legend:
backport of a2a85af4ddde1351f6a54a0f468fed13540e85f5 onto 2.4.2 Fixes flickering of color square in legend in G-Code Viewer
This commit is contained in:
parent
99c9e4a61d
commit
c450592222
@ -3448,9 +3448,8 @@ void GCodeViewer::render_legend(float& legend_height)
|
|||||||
PartialTimes items;
|
PartialTimes items;
|
||||||
|
|
||||||
std::vector<CustomGCode::Item> custom_gcode_per_print_z = wxGetApp().is_editor() ? wxGetApp().plater()->model().custom_gcode_per_print_z.gcodes : m_custom_gcode_per_print_z;
|
std::vector<CustomGCode::Item> custom_gcode_per_print_z = wxGetApp().is_editor() ? wxGetApp().plater()->model().custom_gcode_per_print_z.gcodes : m_custom_gcode_per_print_z;
|
||||||
int extruders_count = wxGetApp().extruders_edited_cnt();
|
std::vector<Color> last_color(m_extruders_count);
|
||||||
std::vector<Color> last_color(extruders_count);
|
for (int i = 0; i < m_extruders_count; ++i) {
|
||||||
for (int i = 0; i < extruders_count; ++i) {
|
|
||||||
last_color[i] = m_tool_colors[i];
|
last_color[i] = m_tool_colors[i];
|
||||||
}
|
}
|
||||||
int last_extruder_id = 1;
|
int last_extruder_id = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user