Fixed shell visualization in g-code preview

This commit is contained in:
Enrico Turri 2018-05-17 09:50:40 +02:00
parent b6b7945830
commit e13564cb19

View File

@ -1762,12 +1762,13 @@ void _3DScene::load_gcode_preview(const Print* print, const GCodePreviewData* pr
else
{
_generate_legend_texture(*preview_data, tool_colors);
_load_shells(*print, *volumes, use_VBOs);
// removes empty volumes
volumes->volumes.erase(std::remove_if(volumes->volumes.begin(), volumes->volumes.end(),
[](const GLVolume *volume) { return volume->print_zs.empty(); }),
volumes->volumes.end());
_load_shells(*print, *volumes, use_VBOs);
}
}