diff options
author | bubnikv <bubnikv@gmail.com> | 2020-03-04 13:36:36 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2020-03-04 13:36:36 +0300 |
commit | 0b96855c2ee2ed0aa2a57890be70679ee7882a00 (patch) | |
tree | 365dd694af8217e79c6a9ec451a88c2b0f3a9fb6 /src/slic3r/GUI/MainFrame.cpp | |
parent | a87ba5d6a6912a06999d0b1f4e19280969b30ddf (diff) |
Reworked the 3DConnexion interfacing code to run the device
enumeration / connect / disconnect and read out at the background
thread only.
Diffstat (limited to 'src/slic3r/GUI/MainFrame.cpp')
-rw-r--r-- | src/slic3r/GUI/MainFrame.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index 18e43388a..4137f7927 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -109,7 +109,8 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_S return; } - if(m_plater) m_plater->stop_jobs(); + if (m_plater) + m_plater->stop_jobs(); // Weird things happen as the Paint messages are floating around the windows being destructed. // Avoid the Paint messages by hiding the main window. @@ -117,6 +118,12 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_S // In addition, there were some crashes due to the Paint events sent to already destructed windows. this->Show(false); + // Stop the background thread (Windows and Linux). + // Disconnect from a 3DConnextion driver (OSX). + m_plater->get_mouse3d_controller().shutdown(); + // Store the device parameter database back to appconfig. + m_plater->get_mouse3d_controller().save_config(*wxGetApp().app_config); + // Save the slic3r.ini.Usually the ini file is saved from "on idle" callback, // but in rare cases it may not have been called yet. wxGetApp().app_config->save(); |