mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-14 03:11:19 +00:00
Refactoring of RemovableDriveManager
1) On Windows and Linux, polling of removable drives is done at a background thread, not at a UI thread. 2) On OSX, there is no polling, but a OS notification callback. 3) Refactored for clarity of the RemovableDriveManager interface.
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include "wxExtensions.hpp"
|
||||
#include "GUI_ObjectList.hpp"
|
||||
#include "Mouse3DController.hpp"
|
||||
#include "RemovableDriveManager.hpp"
|
||||
#include "I18N.hpp"
|
||||
|
||||
#include <fstream>
|
||||
@@ -124,6 +125,9 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_S
|
||||
// Store the device parameter database back to appconfig.
|
||||
m_plater->get_mouse3d_controller().save_config(*wxGetApp().app_config);
|
||||
|
||||
// Stop the background thread of the removable drive manager, so that no new updates will be sent to the Plater.
|
||||
wxGetApp().removable_drive_manager()->shutdown();
|
||||
|
||||
// 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();
|
||||
|
||||
Reference in New Issue
Block a user