diff --git a/src/slic3r/GUI/AppConfig.cpp b/src/slic3r/GUI/AppConfig.cpp index e27fa1be65..d33d945efb 100644 --- a/src/slic3r/GUI/AppConfig.cpp +++ b/src/slic3r/GUI/AppConfig.cpp @@ -357,18 +357,6 @@ void AppConfig::update_skein_dir(const std::string &dir) std::string AppConfig::get_last_output_dir(const std::string &alt) const { -<<<<<<< HEAD -<<<<<<< HEAD - -======= - if (GUI::RemovableDriveManager::getInstance().update()) - { - return GUI::RemovableDriveManager::getInstance().get_last_drive_path(); - } ->>>>>>> removable drive manager - Windows part -======= - ->>>>>>> check if last path is on rem drive const auto it = m_storage.find(""); if (it != m_storage.end()) { const auto it2 = it->second.find("last_output_path"); diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index aff162401f..52255d1763 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -4693,19 +4693,11 @@ void Plater::export_gcode() } default_output_file = fs::path(Slic3r::fold_utf8_to_ascii(default_output_file.string())); auto start_dir = wxGetApp().app_config->get_last_output_dir(default_output_file.parent_path().string()); -<<<<<<< HEAD if (GUI::RemovableDriveManager::get_instance().update()) { if (!RemovableDriveManager::get_instance().is_path_on_removable_drive(start_dir)) { start_dir = RemovableDriveManager::get_instance().get_drive_path(); -======= - if (GUI::RemovableDriveManager::getInstance().update()) - { - if (!RemovableDriveManager::getInstance().is_path_on_removable_drive(start_dir)) - { - start_dir = RemovableDriveManager::getInstance().get_last_drive_path(); ->>>>>>> check if last path is on rem drive } } wxFileDialog dlg(this, (printer_technology() == ptFFF) ? _(L("Save G-code file as:")) : _(L("Save SL1 file as:")), diff --git a/src/slic3r/GUI/RemovableDriveManager.cpp b/src/slic3r/GUI/RemovableDriveManager.cpp index 02681b7daf..77a387aaf5 100644 --- a/src/slic3r/GUI/RemovableDriveManager.cpp +++ b/src/slic3r/GUI/RemovableDriveManager.cpp @@ -276,7 +276,6 @@ void RemovableDriveManager::search_for_drives() search_path(path, pp); } - #endif } void RemovableDriveManager::search_path(const std::string &path,const std::string &parent_path) @@ -330,6 +329,7 @@ bool RemovableDriveManager::compare_filesystem_id(const std::string &path_a, con dev_t id_b = buf.st_dev; return id_a == id_b; } + void RemovableDriveManager::eject_drive(const std::string &path) { if (m_current_drives.empty()) @@ -518,3 +518,4 @@ void RemovableDriveManager::reset_last_save_path() m_last_save_path = ""; } }}//namespace Slicer::Gui + diff --git a/src/slic3r/GUI/RemovableDriveManager.hpp b/src/slic3r/GUI/RemovableDriveManager.hpp index 1e5d240f09..fa42f5e735 100644 --- a/src/slic3r/GUI/RemovableDriveManager.hpp +++ b/src/slic3r/GUI/RemovableDriveManager.hpp @@ -6,7 +6,6 @@ namespace Slic3r { namespace GUI { -<<<<<<< HEAD #if __APPLE__ class RDMMMWrapper; #endif @@ -24,25 +23,12 @@ friend class RDMMMWrapper; #endif public: static RemovableDriveManager& get_instance() -======= -struct DriveData -{ - std::string name; - std::string path; - DriveData(std::string n, std::string p):name(n),path(p){} -}; -class RemovableDriveManager -{ -public: - static RemovableDriveManager& getInstance() ->>>>>>> removable drive manager - Windows part { static RemovableDriveManager instance; return instance; } RemovableDriveManager(RemovableDriveManager const&) = delete; void operator=(RemovableDriveManager const&) = delete; -<<<<<<< HEAD //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() @@ -107,25 +93,4 @@ protected: }; #endif }} -#endif -======= - - //update() searches for removable devices, returns false if empty. - static bool update(); - static bool is_drive_mounted(const std::string &path); - static void eject_drive(const std::string &path); - static std::string get_last_drive_path(); - static std::vector get_all_drives(); - static bool is_path_on_removable_drive(const std::string &path); -private: - RemovableDriveManager(){} - static void search_for_drives(); - static std::vector m_current_drives; -#if _WIN32 -#else - static void search_path(const std::string &path, const dev_t &parentDevID); -#endif -}; -}} -#endif ->>>>>>> removable drive manager - Windows part +#endif \ No newline at end of file