FIX:fixed loading model failure on macos

Change-Id: I3b7944e4dc7339404efc76323d898b660810a92b
This commit is contained in:
tao wang 2023-04-06 15:09:33 +08:00 committed by Lane.Wei
parent 6d445f5754
commit f0a41b552b
2 changed files with 15 additions and 1 deletions

View file

@ -1040,6 +1040,7 @@ void GUI_App::post_init()
}
}
}
//#if BBL_HAS_FIRST_PAGE
bool slow_bootup = false;
if (app_config->get("slow_bootup") == "true") {
@ -2656,6 +2657,11 @@ bool GUI_App::on_init_inner()
this->mainframe->register_win32_callbacks();
#endif
this->post_init();
if (!m_download_file_url.empty()) {
request_model_download(m_download_file_url);
m_download_file_url = "";
}
}
});
@ -5543,7 +5549,13 @@ void GUI_App::MacOpenURL(const wxString& url)
std::string download_file_url = url_decode(download_origin_url);
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << download_file_url;
if (!download_file_url.empty() && (boost::starts_with(download_file_url, "http://") || boost::starts_with(download_file_url, "https://"))) {
request_model_download(download_file_url);
if (m_post_initialized) {
request_model_download(download_file_url);
}
else {
m_download_file_url = download_file_url;
}
}
}
}

View file

@ -228,6 +228,8 @@ private:
bool m_opengl_initialized{ false };
#endif
//import model from mall
std::string m_download_file_url;
//#ifdef _WIN32
wxColour m_color_label_modified;