mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 01:37:53 -06:00
FIX: select file in folder
Change-Id: I383a60f19fe7c54bcb6c1348152ac72a2bab9e34
This commit is contained in:
parent
c431cbf202
commit
011b22dee8
3 changed files with 8 additions and 8 deletions
|
@ -4,7 +4,9 @@
|
|||
#include "I18N.hpp"
|
||||
|
||||
#include "libslic3r/LocalesUtils.hpp"
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include "slic3r/Utils/MacDarkMode.hpp"
|
||||
#endif
|
||||
#include <string>
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
@ -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<wchar_t **>(argv), wxEXEC_ASYNC, nullptr);
|
||||
::wxExecute(L"explorer /select," + widepath, wxEXEC_ASYNC, nullptr);
|
||||
#elif __APPLE__
|
||||
const char *argv[] = {"open", path.data(), nullptr};
|
||||
::wxExecute(const_cast<char **>(argv), wxEXEC_ASYNC, nullptr);
|
||||
openFolderForFile(from_u8(path));
|
||||
#else
|
||||
const char *argv[] = {"xdg-open", path.data(), nullptr};
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue