mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
NEW:support for launching studio from the model web
Change-Id: I931fc8633c057228441daf2ab4c9c37f97e898ab
This commit is contained in:
parent
6f141ea740
commit
7481da52d6
7 changed files with 78 additions and 124 deletions
|
@ -7760,15 +7760,13 @@ int Plater::save_project(bool saveAs)
|
|||
//BBS import model by model id
|
||||
void Plater::import_model_id(const std::string& download_info)
|
||||
{
|
||||
std::string download_url = wxGetApp().get_download_model_url();
|
||||
std::string filename = wxGetApp().get_download_model_name();
|
||||
std::string download_url;
|
||||
std::string filename;
|
||||
|
||||
/* auto selection_data_arr = wxSplit(download_info, '|');
|
||||
|
||||
if (selection_data_arr.size() == 2) {
|
||||
download_url = selection_data_arr[0].ToStdString();
|
||||
filename = selection_data_arr[1].ToStdString();
|
||||
}*/
|
||||
std::string download_origin_url = wxGetApp().url_decode(download_info);
|
||||
fs::path download_path = fs::path(download_origin_url);
|
||||
download_url = download_origin_url;
|
||||
filename = download_path.filename().string();
|
||||
|
||||
|
||||
bool download_ok = false;
|
||||
|
@ -7945,9 +7943,10 @@ void Plater::download_project(const wxString& project_id)
|
|||
return;
|
||||
}
|
||||
|
||||
void Plater::request_model_download()
|
||||
void Plater::request_model_download(std::string url)
|
||||
{
|
||||
wxCommandEvent* event = new wxCommandEvent(EVT_IMPORT_MODEL_ID);
|
||||
event->SetString(url);
|
||||
wxQueueEvent(this, event);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue