From 9fd8461592b42f52166489d91da9e3b468968d88 Mon Sep 17 00:00:00 2001 From: bubnikv <bubnikv@gmail.com> Date: Wed, 10 Apr 2019 13:36:15 +0200 Subject: [PATCH] Changed the scene update on RELOAD_SLA_SUPPORT_POINTS to delay the loading if some transformation gizmo is in action. --- src/slic3r/GUI/Plater.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 78ed7fc91..5d7436250 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -2598,25 +2598,21 @@ 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.flags & PrintBase::SlicingStatus::RELOAD_SCENE) { + if (evt.status.flags & (PrintBase::SlicingStatus::RELOAD_SCENE || PrintBase::SlicingStatus::RELOAD_SLA_SUPPORT_POINTS)) { switch (this->printer_technology) { case ptFFF: this->update_fff_scene(); break; case ptSLA: + // If RELOAD_SLA_SUPPORT_POINTS, then the SLA gizmo is updated (reload_scene calls update_gizmos_data) if (view3D->is_dragging()) delayed_scene_refresh = true; else this->update_sla_scene(); break; } - } - if (evt.status.flags & PrintBase::SlicingStatus::RELOAD_SLA_SUPPORT_POINTS) { - // 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 + } else if (evt.status.flags & PrintBase::SlicingStatus::RELOAD_SLA_PREVIEW) { + // Update the SLA preview. Only called if not RELOAD_SLA_SUPPORT_POINTS, as the block above will refresh the preview anyways. this->preview->reload_print(); } }