Update the SLA slices at the print preview once the index is calculated.

This commit is contained in:
bubnikv 2019-03-14 15:11:27 +01:00
parent 6f2695366e
commit d6b409d0d9
3 changed files with 13 additions and 3 deletions

View file

@ -2434,8 +2434,10 @@ void Plater::priv::on_select_preset(wxCommandEvent &evt)
void Plater::priv::on_slicing_update(SlicingStatusEvent &evt)
{
this->statusbar()->set_progress(evt.status.percent);
this->statusbar()->set_status_text(_(L(evt.status.text)) + wxString::FromUTF8(""));
if (evt.status.percent >= -1) {
this->statusbar()->set_progress(evt.status.percent);
this->statusbar()->set_status_text(_(L(evt.status.text)) + wxString::FromUTF8(""));
}
if (evt.status.flags & PrintBase::SlicingStatus::RELOAD_SCENE) {
switch (this->printer_technology) {
case ptFFF:
@ -2453,6 +2455,10 @@ void Plater::priv::on_slicing_update(SlicingStatusEvent &evt)
// Update SLA gizmo (reload_scene calls update_gizmos_data)
q->canvas3D()->reload_scene(true);
}
if (evt.status.flags & PrintBase::SlicingStatus::RELOAD_SLA_PREVIEW) {
// Update the SLA preview
this->preview->reload_print();
}
}
void Plater::priv::on_slicing_completed(wxCommandEvent &)