Fixed color of objects in preview for SLA printers

This commit is contained in:
enricoturri1966 2021-09-10 09:06:09 +02:00
parent 8bd0f8ada9
commit 8f4a6b3b7c

View File

@ -2118,12 +2118,14 @@ void GLCanvas3D::refresh_gcode_preview_render_paths()
void GLCanvas3D::load_sla_preview()
{
const SLAPrint* print = this->sla_print();
const SLAPrint* print = sla_print();
if (m_canvas != nullptr && print != nullptr) {
_set_current();
// Release OpenGL data before generating new data.
reset_volumes();
_load_sla_shells();
const BoundingBoxf3& bed_bb = wxGetApp().plater()->get_bed().get_bounding_box(false);
m_volumes.set_print_box(float(bed_bb.min.x()) - BedEpsilon, float(bed_bb.min.y()) - BedEpsilon, 0.0f, float(bed_bb.max.x()) + BedEpsilon, float(bed_bb.max.y()) + BedEpsilon, (float)m_config->opt_float("max_print_height"));
_update_sla_shells_outside_state();
_set_warning_notification_if_needed(EWarning::SlaSupportsOutside);
}