FIX:fixed some models with special names cannot be downloaded

Change-Id: Id5a3dff960d6e9868dfa87aef96093de2dc215e6
This commit is contained in:
tao wang 2022-12-20 16:37:25 +08:00 committed by Lane.Wei
parent 301d06dab4
commit c8df45c11f
5 changed files with 23 additions and 13 deletions

View file

@ -7597,15 +7597,15 @@ 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 = "";
std::string filename = "";
std::string download_url = wxGetApp().get_download_model_url();
std::string filename = wxGetApp().get_download_model_name();
auto selection_data_arr = wxSplit(download_info, '|');
/* 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();
}
if (selection_data_arr.size() == 2) {
download_url = selection_data_arr[0].ToStdString();
filename = selection_data_arr[1].ToStdString();
}*/
bool download_ok = false;
@ -7782,10 +7782,9 @@ void Plater::download_project(const wxString& project_id)
return;
}
void Plater::request_model_download(std::string url, std::string filename)
void Plater::request_model_download()
{
wxCommandEvent* event = new wxCommandEvent(EVT_IMPORT_MODEL_ID);
event->SetString(wxString::Format("%s|%s", wxString(url), wxString(filename)));
wxQueueEvent(this, event);
}