fix FDM supports autogenerate button sometimes not working correctly

This commit is contained in:
PavelMikus 2023-01-17 16:23:01 +01:00 committed by Pavel Mikuš
parent 823eb1a251
commit ee5f4f8573
2 changed files with 4 additions and 11 deletions

View File

@ -517,14 +517,6 @@ bool GLGizmoFdmSupports::has_backend_supports()
return done;
}
void GLGizmoFdmSupports::reslice_FDM_supports(bool postpone_error_messages) const {
wxGetApp().CallAfter(
[this, postpone_error_messages]() {
wxGetApp().plater()->reslice_FFF_until_step(posSupportSpotsSearch,
*m_c->selection_info()->model_object(), postpone_error_messages);
});
}
void GLGizmoFdmSupports::auto_generate()
{
ModelObject *mo = m_c->selection_info()->model_object();
@ -549,8 +541,10 @@ void GLGizmoFdmSupports::auto_generate()
}
}
this->waiting_for_autogenerated_supports = true;
wxGetApp().CallAfter([this]() { reslice_FDM_supports(); });
wxGetApp().CallAfter([this]() {
wxGetApp().plater()->reslice_FFF_until_step(posSupportSpotsSearch, *m_c->selection_info()->model_object(), false);
this->waiting_for_autogenerated_supports = true;
});
}
}

View File

@ -44,7 +44,6 @@ private:
bool waiting_for_autogenerated_supports = false;
bool has_backend_supports();
void reslice_FDM_supports(bool postpone_error_messages = false) const;
void auto_generate();
void apply_data_from_backend();
};