diff options
author | David Kocik <kocikdav@gmail.com> | 2019-12-16 15:53:12 +0300 |
---|---|---|
committer | David Kocik <kocikdav@gmail.com> | 2019-12-16 15:53:12 +0300 |
commit | 0db9815467d45812f6d727d60ba637613050d964 (patch) | |
tree | 9ccc61026fc888de8971d4a067e19f4fe00af399 /src/slic3r/GUI/RemovableDriveManager.hpp | |
parent | 507134accb9b05a319c07b69b0126532ce011224 (diff) |
correct beahvior when disconnecting device other way than button in slicer
Diffstat (limited to 'src/slic3r/GUI/RemovableDriveManager.hpp')
-rw-r--r-- | src/slic3r/GUI/RemovableDriveManager.hpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/slic3r/GUI/RemovableDriveManager.hpp b/src/slic3r/GUI/RemovableDriveManager.hpp index fc41fa351..feed62c06 100644 --- a/src/slic3r/GUI/RemovableDriveManager.hpp +++ b/src/slic3r/GUI/RemovableDriveManager.hpp @@ -29,6 +29,7 @@ public: } RemovableDriveManager(RemovableDriveManager const&) = delete; void operator=(RemovableDriveManager const&) = delete; + ~RemovableDriveManager(); //call only once. on apple register for unmnount callbacks. on windows register for device notification is prepared but not called (eject usb drive on widnows doesnt trigger the callback, sdc ard does), also enumerates devices for first time so init shoud be called on linux too. void init(); //update() searches for removable devices, returns false if empty. /time = 0 is forced update, time expects wxGetLocalTime() @@ -53,6 +54,7 @@ public: bool is_last_drive_removed_with_update(const long time = 0); void set_is_writing(const bool b); bool get_is_writing(); + bool get_did_eject(); std::string get_drive_name(const std::string& path); private: RemovableDriveManager(); @@ -70,6 +72,7 @@ private: std::string m_last_save_path; std::string m_last_save_name; bool m_is_writing;//on device + bool m_did_eject; #if _WIN32 //registers for notifications by creating invisible window |