diff --git a/src/slic3r/GUI/GUI.cpp b/src/slic3r/GUI/GUI.cpp index 4c302392b..3765eef2c 100644 --- a/src/slic3r/GUI/GUI.cpp +++ b/src/slic3r/GUI/GUI.cpp @@ -4,7 +4,9 @@ #include "I18N.hpp" #include "libslic3r/LocalesUtils.hpp" - +#ifdef __APPLE__ +#include "slic3r/Utils/MacDarkMode.hpp" +#endif #include #include @@ -545,11 +547,9 @@ void desktop_open_any_folder( const std::string path ) #ifdef _WIN32 const wxString widepath = from_u8(path); - const wchar_t *argv[] = {L"explorer", widepath.GetData(), nullptr}; - ::wxExecute(const_cast(argv), wxEXEC_ASYNC, nullptr); + ::wxExecute(L"explorer /select," + widepath, wxEXEC_ASYNC, nullptr); #elif __APPLE__ - const char *argv[] = {"open", path.data(), nullptr}; - ::wxExecute(const_cast(argv), wxEXEC_ASYNC, nullptr); + openFolderForFile(from_u8(path)); #else const char *argv[] = {"xdg-open", path.data(), nullptr}; diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 38273b9ae..6cd616dcd 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -3336,8 +3336,8 @@ std::string GUI_App::handle_web_request(std::string cmd) { boost::filesystem::path NowFile(path.value()); - std::string FolderPath = NowFile.parent_path().make_preferred().string(); - desktop_open_any_folder(FolderPath); + std::string FilePath = NowFile.make_preferred().string(); + desktop_open_any_folder(FilePath); } } } diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 1c41ab9ef..6fd82c6cb 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -722,7 +722,7 @@ Sidebar::Sidebar(Plater *parent) ams_btn = new ScalableButton(p->m_panel_filament_title, wxID_ANY, "ams_fila_sync", wxEmptyString, wxDefaultSize, wxDefaultPosition, wxBU_EXACTFIT | wxNO_BORDER, false, 18); - ams_btn->SetToolTip(_L("Sync material list from AMS")); + ams_btn->SetToolTip(_L("Synchronize filament list from AMS")); ams_btn->Bind(wxEVT_BUTTON, [this, scrolled_sizer](wxCommandEvent &e) { sync_ams_list(); });