AABB trees for SLA gizmos are not calculated when the object is selected, but only after one of the gizmos is opened

This commit is contained in:
Lukas Matena 2020-02-20 14:28:45 +01:00
parent 487ac0423e
commit 4df6a645f2
5 changed files with 38 additions and 20 deletions

View file

@ -57,6 +57,10 @@ bool GLGizmoHollow::on_init()
void GLGizmoHollow::set_sla_support_data(ModelObject*, const Selection&)
{
if (m_c->recent_update) {
if (m_state == On)
m_c->build_AABB_if_needed();
update_clipping_plane();
if (m_c->m_model_object) {
reload_cache();
@ -983,6 +987,8 @@ void GLGizmoHollow::on_set_state()
m_c->unstash_clipping_plane();
update_clipping_plane(m_c->m_clipping_plane_distance != 0.f);
m_c->build_AABB_if_needed();
// we'll now reload support points:
if (m_c->m_model_object)
reload_cache();