From 146b94264171180199309275c93e0a8553a135e0 Mon Sep 17 00:00:00 2001 From: David Kocik Date: Wed, 18 Dec 2019 10:08:17 +0100 Subject: [PATCH] set_did_eject method --- src/slic3r/GUI/Plater.cpp | 1 + src/slic3r/GUI/RemovableDriveManager.cpp | 4 ++++ src/slic3r/GUI/RemovableDriveManager.hpp | 1 + 3 files changed, 6 insertions(+) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 523cd2bd3..79ebd2850 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -5050,6 +5050,7 @@ void Plater::drive_ejected_callback() { if (RemovableDriveManager::get_instance().get_did_eject()) { + RemovableDriveManager::get_instance().set_did_eject(false); wxString message = "Unmounting succesesful. The device " + RemovableDriveManager::get_instance().get_last_save_name() + "(" + RemovableDriveManager::get_instance().get_last_save_path() + ")" + " can now be safely removed from the computer."; wxMessageBox(message); } diff --git a/src/slic3r/GUI/RemovableDriveManager.cpp b/src/slic3r/GUI/RemovableDriveManager.cpp index d10447cc6..7a2464351 100644 --- a/src/slic3r/GUI/RemovableDriveManager.cpp +++ b/src/slic3r/GUI/RemovableDriveManager.cpp @@ -572,4 +572,8 @@ bool RemovableDriveManager::get_did_eject() { return m_did_eject; } +void RemovableDriveManager::set_did_eject(const bool b) +{ + m_did_eject = b; +} }}//namespace Slicer::Gui diff --git a/src/slic3r/GUI/RemovableDriveManager.hpp b/src/slic3r/GUI/RemovableDriveManager.hpp index 1b337338e..ea4584fee 100644 --- a/src/slic3r/GUI/RemovableDriveManager.hpp +++ b/src/slic3r/GUI/RemovableDriveManager.hpp @@ -56,6 +56,7 @@ public: void set_is_writing(const bool b); bool get_is_writing(); bool get_did_eject(); + void set_did_eject(const bool b); std::string get_drive_name(const std::string& path); private: RemovableDriveManager();