From 84c6199015fde4a7e04fd4cd214580f9f1ac5091 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Mon, 26 Jul 2021 16:17:21 +0200 Subject: [PATCH] Improvements for c5b7d4b2 fix --- src/slic3r/GUI/Plater.cpp | 1 - src/slic3r/Utils/FixModelByWin10.cpp | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 00cc49f75..49d2c3ba2 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -3535,7 +3535,6 @@ void Plater::priv::fix_through_netfabb(const int obj_idx, const int vol_idx/* = } fix_model_by_win10_sdk_gui(*mo, vol_idx); - q->SetFocus(); sla::reproject_points_and_holes(mo); this->update(); this->object_list_changed(); diff --git a/src/slic3r/Utils/FixModelByWin10.cpp b/src/slic3r/Utils/FixModelByWin10.cpp index 7a22c5138..cfe8b68b3 100644 --- a/src/slic3r/Utils/FixModelByWin10.cpp +++ b/src/slic3r/Utils/FixModelByWin10.cpp @@ -36,6 +36,8 @@ #include "../GUI/GUI.hpp" #include "../GUI/I18N.hpp" #include "../GUI/MsgDialog.hpp" +#include "../GUI/GUI_App.hpp" +#include "../GUI/Mainframe.hpp" #include #include @@ -341,7 +343,7 @@ void fix_model_by_win10_sdk_gui(ModelObject &model_object, int volume_idx) wxProgressDialog progress_dialog( _L("Model fixing"), _L("Exporting model") + "...", - 100, nullptr, wxPD_AUTO_HIDE | wxPD_APP_MODAL | wxPD_CAN_ABORT); + 100, GUI::wxGetApp().mainframe, wxPD_AUTO_HIDE | wxPD_APP_MODAL | wxPD_CAN_ABORT); // 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;