From ee5f4f8573fd553a7a5685f90ccf246d1c6eea4c Mon Sep 17 00:00:00 2001 From: PavelMikus Date: Tue, 17 Jan 2023 16:23:01 +0100 Subject: [PATCH] fix FDM supports autogenerate button sometimes not working correctly --- src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.cpp | 14 ++++---------- src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.hpp | 1 - 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.cpp b/src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.cpp index 9b06e5340..6e12527d5 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.cpp @@ -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; + }); } } diff --git a/src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.hpp b/src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.hpp index fb20181d8..b79e1dda7 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.hpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.hpp @@ -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(); };