Send EVT_SLICING_UPDATE with RELOAD_SLA_SUPPORT_POINTS

once object's support points are calculated by the backend.
This commit is contained in:
bubnikv 2019-02-06 14:18:04 +01:00
parent d31cb98fe9
commit fb6f3d8431
3 changed files with 9 additions and 2 deletions

View file

@ -244,8 +244,9 @@ public:
// Bitmap of flags. // Bitmap of flags.
enum FlagBits { enum FlagBits {
DEFAULT, DEFAULT,
NO_RELOAD_SCENE = 0, NO_RELOAD_SCENE = 0,
RELOAD_SCENE = 1, RELOAD_SCENE = 1 << 1,
RELOAD_SLA_SUPPORT_POINTS = 1 << 2,
}; };
// Bitmap of FlagBits // Bitmap of FlagBits
unsigned int flags; unsigned int flags;

View file

@ -552,6 +552,9 @@ void SLAPrint::process()
BOOST_LOG_TRIVIAL(debug) << "Automatic support points: " BOOST_LOG_TRIVIAL(debug) << "Automatic support points: "
<< po.m_supportdata->support_points.rows(); << po.m_supportdata->support_points.rows();
// Using RELOAD_SLA_SUPPORT_POINTS to tell the Plater to pass the update status to GLGizmoSlaSupports
report_status(*this, -1, L("Generating support points"), SlicingStatus::RELOAD_SLA_SUPPORT_POINTS);
} }
else { else {
// There are some points on the front-end, no calculation will be done. // There are some points on the front-end, no calculation will be done.

View file

@ -2229,6 +2229,9 @@ void Plater::priv::on_slicing_update(SlicingStatusEvent &evt)
break; break;
} }
} }
if (evt.status.flags & PrintBase::SlicingStatus::RELOAD_SLA_SUPPORT_POINTS) {
// Update SLA gizmo
}
} }
void Plater::priv::on_slicing_completed(wxCommandEvent &) void Plater::priv::on_slicing_completed(wxCommandEvent &)