diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index b5a229276..b85cc3cd7 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -3503,6 +3503,8 @@ void Plater::priv::fix_through_netfabb(const int obj_idx, const int vol_idx/* = ModelObject* mo = model.objects[obj_idx]; fix_model_by_win10_sdk_gui(*mo, vol_idx); q->changed_mesh(obj_idx); + // workaround to fix the issue, when PrusaSlicer lose a focus after model fixing + q->SetFocus(); } void Plater::priv::set_current_panel(wxPanel* panel) diff --git a/src/slic3r/Utils/FixModelByWin10.cpp b/src/slic3r/Utils/FixModelByWin10.cpp index a3689d927..2fbd0d937 100644 --- a/src/slic3r/Utils/FixModelByWin10.cpp +++ b/src/slic3r/Utils/FixModelByWin10.cpp @@ -36,8 +36,6 @@ #include "../GUI/GUI.hpp" #include "../GUI/I18N.hpp" #include "../GUI/MsgDialog.hpp" -#include "../GUI/GUI_App.hpp" -#include "../GUI/MainFrame.hpp" #include #include @@ -343,7 +341,7 @@ void fix_model_by_win10_sdk_gui(ModelObject &model_object, int volume_idx) wxProgressDialog progress_dialog( _L("Model fixing"), _L("Exporting model") + "...", - 100, GUI::wxGetApp().mainframe, wxPD_AUTO_HIDE | wxPD_APP_MODAL | wxPD_CAN_ABORT); + 100, nullptr, wxPD_AUTO_HIDE | wxPD_APP_MODAL | wxPD_CAN_ABORT); // ! parent of the wxProgressDialog should be nullptr to avoid flickering during the model fixing // Executing the calculation in a background thread, so that the COM context could be created with its own threading model. // (It seems like wxWidgets initialize the COM contex as single threaded and we need a multi-threaded context). bool success = false;