Quick fix for invalidation of support spots search

This commit is contained in:
PavelMikus 2022-07-28 15:47:34 +02:00
parent 1d4f41a2fd
commit ea76977602
4 changed files with 15 additions and 4 deletions

View file

@ -414,7 +414,6 @@ void GLGizmoFdmSupports::get_data_from_backend()
if (mv->is_model_part()){
mesh_id++;
mv->supported_facets.assign(mvs[mv->id().id]->supported_facets);
mv->supported_facets.touch();
m_triangle_selectors[mesh_id]->deserialize(mv->supported_facets.get_data(), true);
m_triangle_selectors[mesh_id]->request_update_render_data();
}
@ -510,6 +509,16 @@ void GLGizmoFdmSupports::auto_generate()
if (not_painted || dlg.ShowModal() == wxID_YES) {
Plater::TakeSnapshot snapshot(wxGetApp().plater(), _L("Autogenerate support points"));
int mesh_id = -1.0f;
for (ModelVolume *mv : mo->volumes) {
if (mv->is_model_part()) {
mesh_id++;
mv->supported_facets.reset();
m_triangle_selectors[mesh_id]->reset();
m_triangle_selectors[mesh_id]->request_update_render_data();
}
}
this->waiting_for_autogenerated_supports = true;
wxGetApp().CallAfter([this]() { reslice_FDM_supports(); });
}